home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 6 / MacMania 6.toast / / Tools&Utilities / EnterAct Stuff / Documentation / EnterAct 4 Manual < prev    next >
Text File  |  1997-05-26  |  368KB  |  9,529 lines

  1. ****************ENTERACT™ USER’s MANUAL*****************
  2. -    -    -    -    -    -    -    -    -    -    -    -
  3. Preface and Copyright
  4. -    -    -    -    -    -    -    -    -    -    -    -
  5. ____
  6. Copyright © 1991-1997 by Dynabyte. EnterAct 4, by Ken Earle.
  7. All rights reserved.
  8.  
  9. EnterAct's basic text engine is a modified form of Roy Wood's
  10. "TE32K" package. You can find it on the net (search for "Roy Wood"
  11. or "TE32K").
  12.  
  13. "More Files" provides some nifty file handling features.
  14.  
  15. "Jims CDEFs" (or "Jim's CDEFs") does the square buttons and tab panels.
  16.  
  17. Thanks to Zelko Jagaric, Wai Choi, Rob Gibson, Steve Olson,
  18. Jean François Cassan, Mark Wong, Scott Jenson, Bill Sears, Sandra Lakin,
  19. Nicolas Berloquin, Romain Vignes &c for help and constructive abuse.
  20.  
  21.                 (Using EnterAct? <Option>zoom to open this window up)
  22.  
  23. You can reach me at:
  24. Ken Earle
  25. 697 Spadina Ave
  26. Toronto, ON
  27. CANADA
  28. M5S 2J1
  29.  
  30. kearle@interlog.com     (Ken Earle)
  31.  
  32. (note 73073,2166 via CompuServe has been dropped)
  33. ____
  34.  
  35. EnterAct 4 is FREE. No catch. Feel free to strip EnterAct down to
  36. a 68K or native PPC version if you like.
  37.  
  38. "hAWK", "Read Resource", their associated source code and
  39. manuals, and the Drag_on Modules interface are yours to keep,
  40. free, no matter what. They are governed by the Free Software
  41. Foundation's "copyleft", as described in the document "copying
  42. hAWK", included with your EnterAct package.
  43.  
  44. You may distribute full copies of EnterAct (omitting no files from
  45. the compressed archive that comprises EnterAct), provided you
  46. do not charge for EnterAct itself. This includes CD distribution.
  47.  
  48. EnterAct is an editor for creating, maintaining, and reviewing C, C++
  49. and Java code. EnterAct has many capabilities (most notably
  50. real-time automatic definition and prototype display, even out of
  51. first-draft code) that just aren’t "out there" yet. This is a
  52. finite-lived product, intended to fill the gap until EnterAct’s best
  53. features are available elsewhere. Let’s hope it doesn’t take more
  54. than a year or two. That having been said, please note that
  55. EnterAct itself is a solid editor. It’s been around since 1989.
  56.  
  57. If you just want to use EnterAct as a "definition viewer" to help
  58. out some other editor, see the section
  59. ____
  60. §    EnterAct as a "definition finder"
  61. ____
  62. (to get there, use "Enter Selection" and "Find Again" on the above line).
  63.  
  64. Metrowerks codewarriors, please see Appendix 5.
  65.  
  66. Symantec lightspeeders, please see Appendix 4.
  67.  
  68. (Using EnterAct? <Option> click in the title bar here)
  69.  
  70. MPWers, start doing your happy dance.
  71.  
  72. For the very very impatient:
  73.     •1    Start up EnterAct ( if you haven't yet).
  74.     •2    Make a project (New Project), just as with THINK C etc.
  75.     Select your preferred folder for <header> files in the next dialog that
  76.     appears, or Cancel to use the folder that contains EnterAct.
  77.     •3    Drag files or folders onto the project window to add files.
  78.     •4    "Update Dictionary". See "DON’T GIVE UP" a page or so below
  79.     if you run into a problem. Usually problems are rare, fixes are easy.
  80.     •5    Pick the "AutoLook" command (it explains itself).
  81.     •6    Open a project source file and browse around. Double-click on
  82.     or click just after any name that you’d like to see a definition
  83.     or prototype for. Watch the AutoLook window. Press <Enter>.
  84.     •7    Come on back here, and learn about all the other good stuff
  85.     (persistent lookup windows, cross-referencing, Automark, browser,
  86.     hyperlinks, the hAWK language, code templates, persistent undo, etc).
  87.  
  88. For the just very impatient: see "EnterAct in brief" instead of this.
  89. Included there are details on using EnterAct as a "definition viewer"
  90. while working with other editors.
  91.  
  92. -    -    -    -    -    -    -    -    -    -    -    -
  93. Requirements
  94. -    -    -    -    -    -    -    -    -    -    -    -
  95. (§)    Network and team users please read this
  96. EnterAct does not keep files open, except when in the act of
  97. reading and writing them. EnterAct is, however, SourceServer
  98. aware, and won't allow changes to a file that have been checked
  99. out as read-only unless you issue a "Modify Read Only" command
  100. or enable EnterAct's "ignore ckid's" option.
  101. So use (multiple copies of) EnterAct only if you have some way of
  102. ensuring that you won't have several people working on the same
  103. copy of a file at the same time (such as SourceServer/Projector).
  104.  
  105. (§)    System requirements
  106. System 7.5 required. Mac II speed (that is, a 68020 running
  107. at 16 mHz) is recommended if your project contains more than about
  108. 500K of text in source and header files combined. A hard disk is a
  109. practical necessity. A large screen (>= 16 inches) will
  110. allow you to take better advantage of EnterAct’s information
  111. lookup capabilities. EnterAct requires 2 Meg of memory minimum, 
  112. 7-10 Meg for big projects. The price of power.
  113.  
  114. A minimum configuration that provides all-round pleasant performance:
  115. 68040 @ 25Mhz, 12Meg RAM installed, Virtual Memory ON, 7 Meg
  116. partition for EnterAct, 1/2 Gig hard drive, System 7.5.3. And at least an
  117. 832x624 screen, preferably 1024x768.
  118.  
  119. EnterAct is intended for creating, maintaining, and reviewing Symantec,
  120. MPW, and MetroWerks C/C++/Java code. You may in rare cases
  121. find one or two small difficulties right at first (see DON’T GIVE UP
  122. just below) but you should find that EnterAct understands your
  123. C/C++/Java, and even your “C--” (first-draft stuff).
  124.  
  125. Feel free to print this manual (use EnterAct so the pictures will print).
  126. The benefits of having it on disk are that you can use Find on the
  127. table of contents and elsewhere to jump to topics of interest, and
  128. that this document is marked with chapter headings—hold down the
  129. <Command> key and click in the title bar to view the marker menu for
  130. this file. You may also encounter this doc in HTML form.
  131.  
  132. -    -    -    -    -    -    -    -    -    -    -    -
  133. DON’T GIVE UP
  134. -    -    -    -    -    -    -    -    -    -    -    -
  135. DON’T GIVE UP if you attempt to "Update Dictionary" and the parser
  136. complains about your perfectly good source: quite often, this first
  137. problem will be your last, and easy to fix. (Note with v3.0.5
  138. EnterAct is smarter about handling complicated preprocessor
  139. tangles -- if you get stuck, please let me know and I
  140. will try to fix the problem at my end. My tech support address
  141. is up above. As of this writing EnterAct runs into problems
  142. only with rather pathological practices, such as duplicated
  143. comment starts [this check can be turned off in the Options
  144. dialog], aliases for keywords, and one or two other oddities
  145. as described in the "Source code restrictions" chapter.)
  146.  
  147. The commonest problem involves conditional #defines which
  148. duplicate important punctuation (here '{'), such as
  149. ____
  150.     #ifdef GO_LONG
  151.     long GetArrayIndex(void) {
  152.     #else
  153.     short GetArrayIndex(void) {
  154.     #endif
  155. ____
  156. —although this particular example doesn't bother EnterAct. If
  157. you do run into a problem it will almost certainly be something
  158. similar, involving duplicated punctuation such as the two '{'s above.
  159. The fix for this sort of problem is to recast the definition slightly
  160. to remove the duplicated punctuation:
  161. ____
  162.     #ifdef GO_LONG
  163.     long GetArrayIndex(void)
  164.     #else
  165.     short GetArrayIndex(void)
  166.     #endif
  167.     {
  168. ____
  169.  
  170. Similarly, if a construction such as
  171. ____
  172.     struct Thing
  173.     #ifdef _cplus_
  174.     : public BaseThing
  175.     #endif
  176.     {....
  177. ____
  178. causes a problem it will work fine if recast as
  179. ____
  180.     #ifdef _cplus_
  181.     struct Thing : public BaseThing
  182.     #else
  183.     struct Thing
  184.     #endif
  185.     {...
  186. ____
  187. although once again this example is handled correctly
  188. by EnterAct.
  189. (Note in this case the definition that appears first will be the
  190. one that appears in your Browser window.)
  191. Nested comment starts ( /*.../*...*/) will also cause the parser
  192. to hiccup. Best, fix the comment so it has one start and one end.
  193. Second best, pick "Options" from the Edit menu and deselect
  194. "Detect nested comment starts".
  195.  
  196. -    -    -    -    -    -    -    -    -    -    -    -
  197. CONTENTS
  198. -    -    -    -    -    -    -    -    -    -    -    -
  199. (Each line in quotes «» below is a "Go to" link: to go to a chapter,
  200. click on its line and select "Go to" from the Search menu.
  201. For more on "Go to" links, see chapter 17.  These chapter links
  202. are available in the popup marker menu, which you can bring up
  203. by holding down the <Command> key and clicking in the title bar.
  204.  
  205. Section names are also listed here, though they are not links or
  206. markers: to go to a section, select the name including the '§', and
  207. then use "Enter Selection" and "Find Again" from the Search menu.
  208. While within a chapter, you can advance from section to section
  209. by searching for just the '§' character, which is an <Option><6>.)
  210.  
  211. «01   Introduction»
  212. «02   About EnterAct»
  213. §    When to use EnterAct
  214. §    An overview
  215. §    Looking ahead
  216. «03   Getting started»
  217. «04   Definitions and conventions»
  218. (chapter 05 has been deleted)
  219. «06   Whirlwind tour»
  220. «07   Source code restrictions»
  221. §    Why not just compilable code?
  222. §    Aliases
  223. §    Obviously unnecessary parentheses
  224. §    Nested comment starts
  225. §    Preprocessor tangles
  226. §    All–or–nothing macro’s
  227. «08   Projects»
  228. §    Introduction
  229. §    Project files
  230. §    Creating a project
  231. §    Selecting your <system> folder
  232. §    Three panes—.c, .h, plain text
  233. §    Adding Java files
  234. §    Add Files—the one-at-a-time way
  235. §    Adding files from a list
  236. §    Add All In Folder—the fast way
  237. §    Add Mac Headers
  238. §    Add THINK Headers
  239. §    Add Standard C Headers
  240. §    The active pane
  241. §    Remove File
  242. §    Remove •'d Files
  243. §    Custom file extensions
  244. §    Distinguishing ".h" from <.h>
  245. §    Copy and search in the project window
  246. §    Project memory needs
  247. §    Multi-file selection
  248. §    Project context restoration
  249. §    Switching to other projects
  250. §    Tips
  251. «09   Dictionaries»
  252. §    Introduction
  253. §    What’s in a dictionary
  254. §    Building your dictionary
  255. §    Keeping it up to date
  256. §    How long will it take?
  257. §    Show Dictionary
  258. «10   Lookup»
  259. §    AutoLook
  260. §    Regular lookup (press <Enter>)
  261. §    <Enter> for lookup, advancing, scrolling
  262. §    Looking up the clip (press <Command><Enter>)
  263. §    Reverse lookup (press <Shift><Enter>)
  264. §    “Sounds like” lookup (press <Option><Enter>)
  265. §    Viewing other entries in lookup windows
  266. §    For faster lookup
  267. §    Hints with lookup
  268. §    Number of lookup windows
  269. §    Number of entries per lookup
  270. §    Keeping lookups around
  271. §    Looking up your notes
  272. §    EnterAct as a "definition finder" for other editors
  273. §    Looking it up with THINK Reference or Toolbox Assistant
  274. «11   Seeing where a term is defined»
  275. §    <Option>double–click
  276. §    Find Definition
  277. §    If there are multiple definitions
  278. §    Other ways of finding definitions
  279. «12   Browsing»
  280. §    The Browse command
  281. §    Finding classes in the Browser window
  282. §    Method and class popups
  283. §    Browsing classes without the browser
  284. §    Browsing methods without the browser
  285. «13   Documents and windows»
  286. §    New, Open, Close
  287. §    Save, Save As, Revert
  288. §    Close and Save Documents
  289. §    Autorevert
  290. §    Modify Read Only
  291. §    Saving window locations
  292. §    ... without being pestered
  293. §    Newly opened windows can be long or short
  294. §    <Option>–Zoom zooms just the length
  295. §    Number of windows at one time
  296. §    The Windows menu
  297. §    The display box
  298. §    Printing
  299. «14   Editing»
  300. §    Introduction
  301. §    Undo
  302. §    Typing, Cut, Copy, Clear
  303. §    Paste preserves indentation
  304. §    Drag and Drop for text
  305. §    Code templates
  306. §    Selection: front, non–front
  307. §    Paste Selection Behind
  308. §    Font, font size, tabs
  309. §    Shift Left / Right
  310. §    Reformat Selection
  311. §    Syntax coloring
  312. §    Graphic nesting display
  313. §    Arrow keys for moving around
  314. §    Illustrating your text
  315. «15   Balance»
  316. §    Checks everything
  317. §    Shows the error location
  318. §    Balancing a file
  319. §    Balancing a specific delimiter
  320. §    Nested and bad comments
  321. §    Starting in the middle
  322. §    The asm problem
  323. «16   Search»
  324. §    Introduction
  325. §    Find is modeless
  326. §    Find options
  327. §    Batch Find options
  328. §    Dual Batch Find
  329. §    <Tab> and <Return>
  330. §    Find again
  331. §    Enter selection
  332. §    Recent finds are remembered
  333. §    Replace
  334. §    Replace and Find Again
  335. §    Replace All
  336. §    Multi–file searches
  337. §    Skip '-' : excluding files from a search
  338. §    THINK Find commands
  339. «17   “Go” commands»
  340. §    Go to Top/Bottom
  341. §    Go to
  342. §    Going to included files
  343. §    Going to text positions
  344. §    Going to markers
  345. §    Go Back
  346. «18   Markers and the Locations menu»
  347. §    Introduction
  348. §    Mark
  349. §    Marker menus
  350. §    Unmark
  351. §    Automark
  352. §    Copying marker names
  353. §    The Locations menu
  354. «19   Options, under the Edit menu»
  355. §    Introduction
  356. §    Number of lookup windows
  357. §    Number of entries per lookup window
  358. §    Remembering window locations
  359. §    Long or short windows
  360. §    Reformat Selection options
  361. §    Detect nested comment starts
  362. §    Ignore 'ckid's
  363. §    Relocate files automatically
  364. §    Automark source files
  365. §    Save source/headers marks
  366. §    Append arguments for automarked functions
  367. §    Record Find, Find Again, Find Definition
  368. «20   Switching to other applications»
  369. §    Under the Finder (System 6)
  370. §    Under MultiFinder (or System 7 or later)
  371. §    Check the disk for changes
  372. §    Working with THINK C
  373. «21   Show activities»
  374. §    Introduction
  375. §    What’s recorded
  376. §    Recording limitations
  377. §    Showing your recent activities
  378. §    What’s shown
  379. §    Temporary, obsolete, and undone activities
  380. §    Updated file names
  381. §    Reviewing activities
  382. §    Selective single undo
  383. §    Reverting a file
  384. §    Turning activity recording on and off
  385. «22  "Index" commands»
  386. §    Functions…
  387. §    Cross-Reference…
  388. §    #Includes…
  389. §    Marker Names…
  390. §    Potential Locals
  391. §    Standard Metrics
  392. §    Check Prototypes
  393. «23  Some thoughts on using EnterAct»
  394. §    Projects are cheap
  395. §    Learning from or reviewing code
  396. §    On documenting your work
  397. «24  If there's a problem»
  398. §    Out of memory
  399. §    Dictionary problems
  400. §    Lookup problems
  401. §    Editing problems
  402. §    Balance problems
  403. «25  License agreement, tech support»
  404. §    Technical support
  405. §    License
  406. «26  Appendix 1: Drag_on Modules»
  407. «27  Appendix 2: Calling hAWK programs»
  408. §    Calling hAWK from the menu
  409. §    Calling hAWK with a command line
  410. «28  Appendix 3: Indent for restyling code»
  411. «29  Appendix 4: EnterAct as THINK's editor»
  412. §    Requirements
  413. §    Installing EnterAct as THINK’s editor
  414. §    Starting a session
  415. §    Working with EnterAct as THINK’s editor
  416. §    Using THINK’s Find commands from EnterAct
  417. «30  Appendix 5: EnterAct and Code Warrior»
  418. «31  Appendix 6: the Scripts menu»
  419.  
  420. (for all about the Drag_on Modules, please see
  421. «hAWK User’s Manual» and «Read Resource Manual»
  422. included with this package, as well as Appendices 1 and 2 here)
  423.  
  424. -    -    -    -    -    -    -    -    -    -    -    -
  425. Introduction
  426. -    -    -    -    -    -    -    -    -    -    -    -
  427. Feeling slightly disoriented? That’s just the anesthetic wearing off.
  428. You now have several megabytes of new memory installed in your head,
  429. preloaded with the important facts on everything of interest in your
  430. source code. To access your new memory, click after the name of any
  431. function, struct, define, etc that you’d like to remember in detail,
  432. and glance at the "AutoLook" window.
  433.  
  434. Welcome to EnterAct. If you’re at light speed, prepare for warp drive.
  435. If you’re learning C/C++/Java, you’ll find that the ability to  look up
  436. anything of potential interest gives you more than total recall:
  437. you now have an on–line personal tutor.
  438.  
  439. If you just want to use EnterAct as a "definition viewer" to help
  440. out some other editor, see the section
  441.     §    EnterAct as a "definition finder"
  442. (to get there, use "Enter Selection" and "Find Again" on the above line).
  443.  
  444. This manual is not as impersonal as it perhaps should be, for
  445. which the author apologizes, however insincerely. My name is Ken
  446. Earle, I’m responsible to you for EnterAct’s performance, and since
  447. several of EnterAct’s editing enhancements will be new to you I
  448. will occasionally intrude a personal opinion or bit of advice. For
  449. the most part, though, you should put on your Adventure hat and
  450. expect to take EnterAct in your own direction. If you’ve
  451. done some programming in C/C++ on the Mac, you’ll find that EnterAct
  452. is very easy to get used to. EnterAct is intended to complement
  453. MPW, Symantec, or CodeWarrior (or Sun's Java), which you will
  454. need for compiling and testing your code. For creating,
  455. maintaining, learning from, and documenting code—read on.
  456.  
  457.  
  458. (§)    60 second warmup
  459. EnterAct uses a project window to keep track of your files, as does
  460. THINK C for example. However, the main purpose of an EnterAct project
  461. is to allow you to build a dictionary of all terms in your project,
  462. for rapid lookup. There are three panes in an EnterAct project window,
  463. containing your .c, .h, and documentation files from left to right
  464. respectively. The easiest way to add files to your project is to drag
  465. files/folder onto your project window. To build a dictionary, select
  466. “Update Dictionary”. Unless there are major errors in your source code,
  467. this will zip along at several files per second. (If you hit a problem, see
  468. DON’T GIVE UP up above, around line 133 for easy fixes to most
  469. problems.) Double–click on any file name in the project window to
  470. view a file. To look up a term, double-click on it, or click just after
  471. it (or of course type it in) and press <Enter>. Select “AutoLook” to put
  472. EnterAct’s automatic definition retriever on-screen, and it will keep up
  473. with you as you edit and click about. You should find that "AutoLook"
  474. by itself can fill most of your information needs.
  475.  
  476.  
  477. (§)    Onwards
  478. What next? If you read straight ahead to the end of the “Whirlwind
  479. tour” you’ll have a good grasp of the basics. Reading the remainder
  480. of the manual at some point is a good idea. You will find that many
  481. things that were relatively complicated or tedious before, such as
  482. information lookup, integrating documentation with code, file and
  483. window management, picking up where you left off, etc, are now much
  484. simpler, some to the point of being completely automatic. Inevitably,
  485. when tasks become simpler, new possibilities and approaches spring to
  486. mind.
  487.  
  488. You can use EnterAct as a replacement for THINK’s editor (THINK
  489. version 6 and later, the “use external editor” Edit option in
  490. THINK)—see Appendix 4 for the easy how-to. EnterAct also sends
  491. "touch" events to any running CodeWarrior compilation
  492. environment. 
  493.  
  494. After you feel comfortable with EnterAct, please take a look at the
  495. “hAWK User’s Manual” on disk. Many useful programs are supplied for
  496. this powerful little language, they’re easy to run, and hAWK does its
  497. work in the background.
  498.  
  499. And remember, take a break every hour!
  500.  
  501. -    -    -    -    -    -    -    -    -    -    -    -
  502. About EnterAct
  503. -    -    -    -    -    -    -    -    -    -    -    -
  504. §    When to use EnterAct
  505. EnterAct is a standalone, project-oriented, language-aware programmer’s
  506. editor designed to smooth the process of creating C, C++, and Java code.
  507. You should find EnterAct useful for the following tasks:
  508.     •    requirements analysis, specification, and design document creation
  509.         or review
  510.     •    creating, maintaining and reviewing source code
  511.     •    as a "definition finder", helping editors that aren't as aware
  512.     •    linking support documents and source code
  513.     •    debugging sessions that require extensive source code review
  514.     •    keeping a log of your activities
  515.     •    oddjobs such as multi-file search and replace, automatic source code
  516.         generation, cross-referencing, algorithm prototyping, deleting or
  517.         copying a list of files, etc etc (via “Index” commands and hAWK,
  518.         both under the EnterAct menu)
  519.     • reformatting your C/C++ code (with Indent, under the EnterAct menu).
  520.  
  521. You'll need a compiler/debugger for compiling and testing your
  522. code, and a resource editor will round out your code creation
  523. environment.
  524.  
  525. EnterAct can be used in place of THINK’s editor (the “use external
  526. editor” Edit option in THINK version 6/7). For the simple setup
  527. required, see Appendix 4.
  528.  
  529. To use EnterAct as a "definition finder" with other editors:
  530.     •    read enough here to learn how to create a project, build
  531.     a dictionary, and show the "AutoLook" window. Knowing
  532.     how to call up "lookup" windows by pressing the <Enter>
  533.     key is also useful. 
  534.     •    when you're using the other editor, also run an EnterAct
  535.     project with contents roughly corresponding to the code
  536.     you're working on - have the "AutoLook" window open,
  537.     as the frontmost text window in EnterAct. Your project
  538.     dictionary should be reasonably up to date.
  539.     •    to look up a term with EnterAct; Copy it in the other editor,
  540.     and switch to EnterAct. If you don't immediately see the
  541.     definition in the AutoLook window (rare), press
  542.     <Command><Enter>. To look up the class or struct that
  543.     contains a particular member, press <Shift><Command><Enter>.
  544.  
  545. §    An overview
  546. EnterAct provides a variety of capabilities in several different areas
  547. to make creating and reviewing code simpler. As the following summary
  548. suggests, you do have a handful of new concepts to become comfortable
  549. with. But for the most part you’ll find just new ways of looking at
  550. old problems, and it shouldn’t be long before you take it all for
  551. granted.
  552.  
  553.  
  554. >    Information management
  555.     •    each EnterAct project stores, for instant retrieval:
  556.         •    the prototype of every method and function (including static and
  557.             in-line)
  558.         •    and the full definition of every class, struct, union, enum, enum
  559.             constant, #define’d constant or macro, typedef, and variable
  560.  
  561.         provided the definition or declaration occurs at the top level of
  562.         your project source code, or within a class. As a special case, #define’s
  563.         within struct, union, and enum bodies are also recorded. (Hereafter,
  564.         “definition” will be used as shorthand for “definition or prototype”).
  565.     •    Definitions can be stored for any C/C++/Java file you
  566.         specify, including toolbox headers, standard library files, class
  567.         source or headers, and of course your own source files, even if they
  568.         are under development (typically EnterAct can tolerate or compensate
  569.         for almost all first-draft errors and omissions)
  570.     •    the “AutoLook” window automatically displays the definition of any
  571.         name that you select or click after, keeping up with you as you edit
  572.         and mouse around. It also serves as a spelling checker
  573.     •    for more permanent displays of definitions, or to look up a term when
  574.     you’ve forgotten its correct spelling, double-clicking on or clicking
  575.     after the name and pressing the <Enter> key creates a separate window
  576.     holding the definition. This is called "regular” lookup, and the
  577.     resulting window shows either all variant definitions, if your spelling
  578.     was exact, or closest matches, based on runs of matching characters,
  579.     if your spelling was off
  580.     •    for phonetic or “sounds like” lookup, press <Option><Enter> instead
  581.     •    for reverse or “struct for member” lookup, press <Shift><Enter> to
  582.     view all structs, classes, and unions whose definitions mention the
  583.     name
  584.     •    results for regular, phonetic, and reverse lookup are shown in a
  585.     new separate “lookup” window, politely sized and placed. Hold down the
  586.     <Option> key and click in its title bar to select from a popup menu
  587.     listing the definitions that were retrieved for the name being looked up
  588.     •    as a result of the above approach, you can show several definitions
  589.     at once from the same file or different files in separate, self-managed
  590.     windows.
  591.     •    EnterAct's "Browse" window does the expected things (and more),
  592.     and works with first-draft C++ or Java code. And it looks pretty.
  593.  
  594. >    File and window management
  595.     •    an EnterAct project window has three panes, showing source, header,
  596.         and documentation file names in separate alphabetical columns. Any
  597.         file can be opened by double-clicking on its name (or hit <return>)
  598.     •    since Enteract is not a compiler, there is no need to set up code
  599.         segments. As a result, EnterAct’s “Add All In Folder” command can
  600.         add all of the files in a folder to your project with a single click
  601.         (including, optionally, all files in subfolders), automatically placing
  602.         source, header, and documentation files in their appropriate panes.
  603.         Dragging files or folders onto a project window works the same way.
  604.     •    all Mac headers, THINK C headers, or standard C headers can be added
  605.         to your project with single separate menu commands
  606.     •    multi-file selections (a generalization of multi-file searching)
  607.         can be made right in the project window
  608.     •    windows can remember their screen location and size—and, if you so
  609.         choose, won’t pester you about saving changes if all you changed was
  610.         the location or size
  611.     •    when EnterAct opens a file for the first time, it bases the width
  612.         of the window on the first 20 lines of the file
  613.     •    <Option>-zoom drops down the bottom of a window, not affecting the
  614.         width.
  615.     •    text files are saved safely. Project saving is automatic, and this
  616.         is threaded into the background when possible.
  617.  
  618. >    Editing
  619.     •    smart paste of code blocks reduces the need to “Shift” left or right
  620.     •    the “Paste Selection Behind” command combines Copy, switch to the
  621.         window just behind, and Paste over what is selected there. It’s
  622.         undoable (in EnterAct even “Replace All” is undoable), and to help you
  623.         anticipate results the selection in your next-to-front window is
  624.         outlined in a box
  625.     •    full Drag & Drop for text
  626.     •    “Balance” handles comments and strings, and can balance a whole file
  627.         at once. If there is an error, you will be shown where it is
  628.     •    now and then, a picture is worth a thousand words. For these
  629.         occasions, you can place and display a picture in any text document,
  630.         even a source file (put it inside a comment, and the compiler will
  631.         never know) -- search here for "Illustrating your text"
  632.  
  633. >    Context restoration
  634.     •    “project context restoration”: when you close an EnterAct project,
  635.         it keeps a list of your project files that were open at the time; and
  636.         when you later reopen the project, your working documents will reopen
  637.         at the same time, placed on the screen where you left them (also called
  638.         the “painless Quit”) 
  639.     •    “activity review”: the “Show Activities” command displays a list
  640.         of the last 10,240 things you have done, in plain English, with full
  641.         contents of all text inserts and deletes. With this display, you can:
  642.         •    review your progress when making complicated changes
  643.         •    accurately bring your “Log” or “Version History” up to date if you
  644.             let this lapse for a bit
  645.         •    selectively undo a single activity
  646.         •    revert files to recover earlier versions
  647.     •    “safe switching”: EnterAct will optionally save your documents when
  648.         you switch out, and refresh them from disk when switching back if
  649.         you changed any with some other application. This restores the
  650.         synchronisation between EnterAct and other applications, and helps
  651.         prevent losing changes to a file.
  652.  
  653. >    Context alteration ("navigation”)
  654.     •    Automatic marking of source files whenever you open or save
  655.         a file, including all function, method, and class definitions.
  656.         (To access a document’s marker menu, hold down the <Option> or
  657.         <Command> key and click in the title bar of its window)
  658.     •    “Go to” accepts a file name followed by line number, or file name
  659.     followed by marker name, or any one of file name, line number, or
  660.     marker name, and also accepts CodeWarrior-style error
  661.     window locations. Useful for:
  662.         •    putting fixed links in your documents with file name followed by
  663.             line number (such as /* See App_Main.c 389 */ )
  664.         •    maintained links, consisting of file name followed by marker name
  665.             (such as /* See «MyApp Design Notes» «2.3 Custom Resources» */
  666.             To generate the text for a link of the form «file name» «marker
  667.             name», hold down the<Shift> and  either <Option> or <Command> keys
  668.             while clicking in the title bar of the window that has the mark; when
  669.             you select the mark from the resulting popup marker menu, the text
  670.             will be copied to your clipboard. Both file and marker name may be
  671.             abbreviated or slightly incorrect, eg
  672.             /* See «Design N» «Custom Rez» */
  673.         •    jumping to locations as reported in the “Show Activities” display
  674.         •    jumping to locations generated by hAWK programs
  675.             ($CompareFiles, $MFS_SuperLister, and many others)
  676.             and also locations generated by several of the "Index" commands,
  677.             such as "Cross-Reference..."
  678.     •    “Go Back” lets you toggle between two locations, in one or two files
  679.     •    jumping to a definition (<Option> double-click) works with toolbox
  680.         headers, first-draft code, and your own notes, almost always going
  681.         straight to the definition with no stumbling over a mention in a
  682.         comment, or a prototype. This allows you to use defined term names in
  683.         source or documentation as true “hyperlinks”.
  684.     •    the Locations menu provides "global" (project-independent) markers.
  685.  
  686. >    The best little language in the world
  687.     •    “hAWK” is a project-oriented version of “AWK”. AWK has long been
  688.         the C programmer’s little language of choice, and hAWK, with its
  689.         simple “three clicks and run” interface, is as easy to invoke as any
  690.         macro language (there's a command line too)
  691.     •    with one click, you can choose to have a program take its input from
  692.         the front text file in EnterAct, or all files selected for multi-file
  693.         operations in your EnterAct project
  694.     •    hAWK is a full programming language, modelled after C but simpler
  695.         in many ways, with many additional built-in capabilities (especially
  696.         for dealing with text)
  697.     •    use supplied hAWK programs to: generate a list of full path names
  698.         for all files in a project, list all occurrences of a word or string
  699.         or regular expression, copy or erase files, translate a C declaration
  700.         into English, list all potential local variables in a C function under
  701.         development, compare files, etc
  702.     •    and you can write your own programs to: check the contents of custom
  703.         resources or file data, prototype algorithms, and in general handle
  704.         any odd job having to do with text files that you can spell out an
  705.         algorithm for (using the fullest implementation of regular expressions
  706.         available anywhere) -- I'm working on "text to html" at the moment....
  707.     •    as of version 3, you can write "magic clipboard" programs in hAWK
  708.         that will monitor EnterAct's clipboard, and, when conditions you
  709.         specify are met, will do anything you like to the clipboard's
  710.         contents. Useful for mowing down repetitive but moderately
  711.         complicated tasks (eg changing old-style C function declarations
  712.         to the new prototype style, changing /**/ comments to //). Once
  713.         your hAWK program is running, all you do is Copy and Paste. Typically
  714.         these programs flash the menu bar to indicate that the clipboard
  715.         has been altered.
  716.     •    "Code templates" make it easy to fire off a hAWK program by using
  717.         a command line -- see «27  Appendix 2: Calling hAWK programs» below.
  718.  
  719. >    Using EnterAct as THINK’s editor
  720.     •    EnterAct works fine by itself, but if you have version 6 or
  721.     later of THINK C and sufficient memory you can use EnterAct as
  722.     a replacement for THINK’s own editor (this is the “use external
  723.     editor” option described in your THINK manual).
  724.     •    using EnterAct as THINK’s editor eliminates the need to
  725.     “Make” your THINK project when bringing it up to date, since
  726.     THINK C will automatically be made aware whenever you change
  727.     a source file with EnterAct—and all of EnterAct’s best features,
  728.     such as info display and hyperlinking, will be available within
  729.     THINK C. For the details, see Appendix 4.
  730.  
  731. >    Using EnterAct as CodeWarrior's editor
  732.     •    EnterAct sends "touch" events to any open CodeWarrior project,
  733.         so CodeWarrior will be able to keep track of which files need
  734.         recompiling.
  735.  
  736. >    Using EnterAct as a "definition viewer" with other editors:
  737.     •    Have EnterAct with an appropriate project running while
  738.     you use the other editor. Your dictionary should be reasonable
  739.     up to date, and the AutoLook window open
  740.     •    Copy a term in the other editor, and switch to EnterAct
  741.     for instant definition display in the "AutoLook" window
  742.     •    If you don't see an instant definition, try
  743.     <Command><Enter> for spell-tolerant lookup of the clip
  744.     to a separate lookup window
  745.     •    To look up the struct or class containing a copied member
  746.     name, press <Shift><Command><Enter>
  747.     (When looking things up with the <Enter> key, <Command> is
  748.     for Clipboard, and <Shift> is for member lookup -- also called
  749.     "reverse" lookup, so remember "<Shift> into reverse"....)
  750.     
  751. >    Miscellaneous
  752.     •    EnterAct’s “Print” command can print illustrated documents, and
  753.         always folds back long lines rather than clipping them off
  754.     •    “Reformat Selection” lets you clean up plain text documentation,
  755.         including long comments. It was used to maintain this document
  756.     •    “Save As” can be used with projects, so you don’t have to start over
  757.         each time
  758.     •    “Index” commands under the EnterAct menu: function call/called by
  759.     lists, cross-referencing, lists of markers or #included files, and
  760.     “Potential Locals”, which helps ease the declaration of local variables
  761.     (note most of these are for use with C code only, sorry)
  762.     • the "Indent" command invokes a Drag_on Module which allows you
  763.     to adjust the whitespace in your C or C++ source files. Like hAWK,
  764.     it comes equipped with a simple dialog interface, though you can
  765.     use a command line if you want.
  766.  
  767. §    Looking ahead
  768. It would be best at first to focus on building EnterAct projects and
  769. exploiting the various ways of looking up definitions and navigating
  770. around. For the necessary background, read straight ahead here to the
  771. end of the “Browsing” chapter. The one vital new skill to master is
  772. that of pushing the <Enter> key to view definitions, although the
  773. "AutoLook" window will almost always beat you to it.
  774.  
  775. After the “Browsing” chapter, topics become relatively independent.
  776. “Switching to other applications” is recommended reading, since as
  777. mentioned above EnterAct will save documents when you switch out and
  778. refresh them from disk when you switch back, and you should either
  779. agree with this approach or turn this option off. And before starting
  780. in on the “hAWK User’s Manual” on disk, it will help to be familiar
  781. with EnterAct’s approach to multi-file searching, as explained in the
  782. “Searching” chapter. For some fun, check out "§    Code templates" below.
  783.  
  784. For help with any difficulties that might pop up, see the “If there’s
  785. a problem” chapter towards the end of this manual.
  786.  
  787. -    -    -    -    -    -    -    -    -    -    -    -
  788. Getting started
  789. -    -    -    -    -    -    -    -    -    -    -    -
  790. (§)    Installation
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813. You’ll find complete instructions for placing the bits and
  814. pieces that make up EnterAct on disk 1 in the file “Installing
  815. EnterAct 4/tt” (which starts up TeachText if you double-click it).
  816.  
  817. There are two different approaches you can take:
  818.     •    drop some aliases into your "EnterAct Stuff" folder
  819.     •    move EnterAct into your compiler folder
  820.  
  821. Recommended, drop aliases of your main development environment
  822. folders (CW, Symantec, MPW etc) into your EnterAct folder. When you
  823. are making a new project and are asked to select a <system> folder,
  824. select the appropriate alias.
  825.  
  826. (§)    What to do first
  827. If you don’t feel comfortable using your Macintosh yet, please take
  828. an hour or so to play with some other program before continuing.
  829.  
  830. The Whirlwind tour will introduce you to the most important things.
  831. After a bit of pushing the <Enter> key and and playing with your new
  832. memory, you’re ready to start using EnterAct seriously—but it wouldn’t
  833. hurt to read the rest of the manual. 
  834.  
  835.  
  836. (§)    Please read these
  837. If you’re a multi–platform developer, please read the section on
  838. “All–or–nothing macro’s” in the “Source code restrictions” chapter.
  839.  
  840. And you should know that EnterAct's default behaviour is to save all
  841. open documents when you switch out, as discussed in “Switching to
  842. other applications”, chapter 20. To avoid this, deselect the
  843. "Safe switching" option at the top of EnterAct's "Options..." dialog.
  844.  
  845.  
  846. (§)    hAWK and Read Resource
  847. After becoming acquainted with EnterAct, add the “hAWK User’s Manual”
  848. and “Read Resource Manual” to an EnterAct project, open them up, and
  849. read along. Learning “Read Resource” takes 5 minutes. Learning to run
  850. a few hAWK programs takes an hour or so,  learning to write them isn’t
  851. that tough—and it’s fun! Adapting your application to call hAWK will
  852. take a day or two. Changing hAWK is harder, but all the source is there.
  853. "hAWK" is a Mac interpreter for "AWK", which resembles C (though
  854. lacking C's more complicated features) with many built-in functions
  855. that let you dash off small programs to do nifty text manipulation.
  856.  
  857. -    -    -    -    -    -    -    -    -    -    -    -
  858. Definitions and conventions
  859. -    -    -    -    -    -    -    -    -    -    -    -
  860. (Note menu commands may appear in quotes here but often are
  861. just capitalized. They are sometimes used as verbs, as in
  862. “when you Balance a comment...”.)
  863.  
  864. Balance: checks all paired delimiters, and detects nested or
  865. improperly–formed comments. If you have an insertion point at the very
  866. beginning of the file, Balance will check the entire file. If there’s
  867. an imbalance, you’ll see where it is. Balance always includes the
  868. delimiters in the shown selection, because to exclude them is stupid.
  869.  
  870. Definition or Entry: for functions and methods, the prototype or
  871. equivalent. For everything else (struct, #define, variable, etc), the
  872. full statement in which the term was mentioned or defined.
  873.  
  874. Dictionary: the collection of terms and definitions for your project.
  875.  
  876. Drag_on Module: a “mini application” packaged as a separate CODE
  877. resource, called as a C function. For instructions and code to call
  878. Drag_on Modules from your application, see the “code to call Drag_ons”
  879. folder on disk 2, and also the example Drag_on caller “Minimal App7”.
  880. While Drag_on Modules require some application to act as a “shell”,
  881. support for all callback functions by the calling application is
  882. optional. Two modules are included: hAWK, a Mac version of AWK (see
  883. “hAWK User’s Manual”) and Read Resource (see “Read Resource Manual”).
  884. If you follow the “Getting started” instructions, both modules will
  885. appear at the bottom of EnterAct’s “EnterAct” menu.
  886.  
  887. Find Definition: given a selected dictionary term, opens the file where
  888. the term is defined and scrolls to the first instance of the term in
  889. the file. The equivalent of <Option>double–click, but in addition works
  890. with full method names, which contain colons.
  891.  
  892. “Go to” link, “Go to” selection: text typically of the form
  893.     file-name marker-name 
  894. where “file-name” is the name of an EnterAct project file and
  895. “marker-name” is the name of a marker in the file, with optional
  896. European-style quotes around either part
  897.     (for example, «MyProj.LOG» «To Do» ).
  898. To open the file and go to the marked position, select the
  899. file-name marker-name text and use the Go to command. Details are in
  900. “‘Go’ commands”, chapter 17.
  901.  
  902. Insertion point: the flashing “|” cursor which marks your place in a
  903. text window when no characters are selected. 
  904.  
  905. Look up a term: to look up a term, select an insertion point just to
  906. the right of it, or double-click on it, and press <Enter>. A lookup
  907. window will appear. The AutoLook window shows definitions automatically
  908. as you type or edit (double-click on the term or click to the right
  909. of it, or type it in).
  910.  
  911. Lookup window: a special kind of text window used to show dictionary
  912. entries. The title begins with “••” or “¶¶”. Often several entries are
  913. “stacked” in one lookup window; to cycle through them, press <Enter>
  914. with a range of characters selected -- or better, hold down the
  915. <Option> key and drag in the window's title bar to pick from a
  916. popup menu.
  917.  
  918. Menu commands are often quoted, always capitalized.
  919.  
  920. Paired delimiters:
  921.     • ()         round brackets, or parentheses
  922.     • []         square brackets
  923.     • {}         braces, or curly braces
  924.     • /* */     comment start and end, together a comment
  925.     • " "         double quotes, around strings (continued across lines with “\”)
  926.     • ' '         single quotes, or ticks.
  927.  
  928. Paste Selection Behind: will Copy the selection in the front window,
  929. switch to the next window, and Paste over what is selected there. The
  930. selection in the next–to–front window will be shown by a two–pixel wide
  931. black border.
  932.  
  933. Project: a three–pane window containing any group of source, header,
  934. plain text, and PICT documents. Selecting Update Dictionary builds a
  935. dictionary for all source and header files. Both the file list and the
  936. dictionary are kept on disk in the corresponding project file.
  937. Double–clicking on a file shown in the project window will both open
  938. the file and send the project window behind all other windows. It can
  939. be brought to the front again with the Windows menu, or
  940. <Command><zero>, if it’s hidden.
  941.  
  942. Range of characters selected: white text on a black background in the
  943. front window, seen for example when you drag over some text. In the
  944. next–to–front window, the selection range is shown outlined in a black
  945. box rather than white on black (the next– to–front window is affected
  946. by Paste Selection Behind, and by some Search commands when the Find
  947. dialog is in front).
  948.  
  949. Recent activity: a full specification of something you’ve done recently
  950. with EnterAct, as presented in the “••Recent Activities” window
  951. generated by the Show Activities command. All significant activities
  952. are recorded, including cut copy paste typing find replace new open
  953. close revert start quit. Recorded details include time, location, and
  954. contents if it was an insert or delete. For details see the “Show
  955. Activities” chapter.
  956.  
  957. Reformat Selection: evens out the line lengths in a range of selected
  958. text, with maximum line length and ragged right versus full
  959. justification as specified in the Options dialog. Intended for use with
  960. comments or plain text, rather than code.
  961.  
  962. Regular lookup: double-click on or click after a term, and press
  963. <Enter>. A lookup window appears, holding all definitions of the term,
  964. or closest matches based on spelling if your spelling was off.
  965. <Option>click in the title bar for a list of definitions.
  966.  
  967. Reverse lookup: select as for regular lookup, but press <Shift><Enter>.
  968. The resulting lookup window holds all struct, union, and class
  969. definitions which mention the word(s) being looked up. <Option>click
  970. in the window's title bar for a list of containing definitions.
  971.  
  972. Sounds-like lookup: select as for regular lookup, but press
  973. <Option><Enter>. Like regular lookup, but not case-sensitive, with
  974. closest matches based on sound rather than spelling. <Option>click in
  975. the resulting lookup window’s title bar for a list of definitions.
  976.  
  977. Specific single keys are placed in <>, eg <Enter>, <Option>, <Return>,
  978. <period>.
  979.  
  980. -    -    -    -    -    -    -    -    -    -    -    -
  981. Whirlwind tour
  982. -    -    -    -    -    -    -    -    -    -    -    -
  983.  
  984. (§)    Hum along
  985. This little tour displays EnterAct’s basic capabilities, to help you
  986. avoid that “lost in space” feeling. However, there is much of potential
  987. interest that is not covered here, so please at least browse through
  988. the rest of the manual afterwards.
  989.  
  990. For an example project we’ll be using “Minimal App7”, the files for
  991. which are included with EnterAct. If you feel adventurous,
  992. substitute your own project for Minimal App below.
  993.  
  994. To exactly follow the tour, you’ll need the files that make up “Minimal
  995. App7”, a minimal application that does nothing but call Drag_on
  996. Modules. The “Minimal App7 ƒ” folder contains the needed
  997. files. If you haven't moved it, it's still in your "EnterAct stuff"
  998. folder.
  999.  
  1000.  
  1001. (§)    Create a project
  1002. We’ll be working with the files that make up “Minimal App7”, and the
  1003. first step will be to create a project for it. The project will list
  1004. source, header, and documentation files, and also hold a dictionary
  1005. of all terms of interest.
  1006.  
  1007. Let's go! You're probably using EnterAct at this moment, but if not,
  1008. Double–click on the EnterAct icon to start, and cancel the dialogs that appear.
  1009.  
  1010. To make a project for Minimal App7:
  1011.     • pick "New Project" from the EnterAct menu
  1012.     • pick a nice location for your project, and give it a name such as
  1013.     “MinimApp7.e”
  1014.     • click the Save button
  1015.     • in the subsequent dialog that appears, asking you to pick a <system>
  1016.     folder, pick your favorite development environment's folder (CW,
  1017.     Symantec, MPW etc) -- or if you have put an alias for the folder
  1018.     inside your EnterAct folder, pick it instead (IMPORTANT, some
  1019.     development environments contain multiple versions of the toolbox
  1020.     headers -- eg for CW select the "MacOS Support"  folder)
  1021.     • A three–pane project window will appear.
  1022.  
  1023. (§)    Add some files
  1024. You can add files to your project one at a time with the Add Files
  1025. command, and there are are other menu commands to add all files in
  1026. folders, all files in subfolders, and even all files from a list of full
  1027. path names (hold down the <shift> key and look under the EnterAct
  1028. menu for the last two). But we're going to do it the easy way first:
  1029. switch to the Finder, locate the folder called "Minimal App7 ƒ"
  1030. inside your main EnterAct folder, and drag it onto your new project
  1031. window. All files in the folder will be added to your project.
  1032.  
  1033. There is no need to ever select one of the three window panes when
  1034. adding files. The left pane is for your source files (.c), the middle
  1035. for all header files (.h), and the right pane is for all other text
  1036. files (and PICT’s). EnterAct selects the correct pane for each file
  1037. automatically.
  1038.  
  1039.  For our project we’ll also want the toolbox headers and MW or THINK C
  1040.  headers. To add these to your project, hold down the <Shift> key and
  1041.  select Add Mac Headers. All of the standard toolbox headers, and,
  1042.  because of the <Shift> key, all THINK C headers, will be added to the
  1043.  middle (header, or “.h”) pane of your project. If you don't have the
  1044.  THINK C headers, omit the <Shift> key (or ignore any error message).
  1045.  
  1046.  If EnterAct complains that multiple versions of the toolbox headers
  1047.  were found, use the "Select <system> folder" command under the
  1048.  EnterAct menu to select a more specific subfolder within your
  1049.  development environment folder (eg for CW select the
  1050.  "MacOS Support"  folder.
  1051.  
  1052.  And for good measure, use the Add Front File command to add this
  1053.  document to your project.
  1054.  
  1055. At this stage, your project should look something like this:
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064.  
  1065.  
  1066. ____
  1067.             source pane                    header pane                documentation pane
  1068. ____
  1069.  
  1070. For illustration purposes the project window has been kept small, but
  1071. feel free to make it as large as you like. The project window will go
  1072. to the back when you double-click on a file name to open a file, and
  1073. it can be brought to the front from the Windows menu if it’s hidden.
  1074.  
  1075.  
  1076. (§)    Build a dictionary
  1077. (".c" and ".h" are used as shorthand for source and header below)
  1078. Your dictionary will contain all terms in your .c and .h files that
  1079. are defined or mentioned outside of a function, struct, or union body.
  1080. To build, it, select Update Dictionary from the Project menu, and sit
  1081. back for a few seconds—this shouldn’t take long, typically under 1/2
  1082. second per file on a Mac II. If a major problem or bug does interrupt the
  1083. dictionary build, you’ll see a message telling you what’s up. You can
  1084. either fix it and reselect Update Dictionary, or, with the
  1085. offending file selected in the project window, select Remove File
  1086. followed by Update Dictionary to go on with this tour immediately.
  1087. (See DON'T GIVE UP near line 110 above for fixes to common problems.)
  1088.  
  1089. If you are pursuing your own project instead of Minimal App7, you may
  1090. run out of memory when building your dictionary. If this happens,
  1091. either increase the amount of memory allocated to EnterAct by one Meg
  1092. and try again, or see “EnterAct Memory Needs” on disk 1 for a detailed
  1093. guide to estimating memory needs. Two megabytes can handle a small
  1094. project, but a real whopper may need seven or more.
  1095.  
  1096. (§)    Viewing definitions and prototypes
  1097. If you’re following along with the Minimal App example, open
  1098. “minimalApp7.c” by double-clicking on its name in the left pane of your
  1099. project window. To arrive at the right position for our example, select
  1100. Find from the Search menu, type in "waitnextevent(", click the "Ignore
  1101. case" button,  and then type <Return> or click the OK button until
  1102. you see the following:
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114. Now is a good time to activate the AutoLook window: first free up some
  1115. room on your screen (a couple of inches at the bottom will do) and
  1116. then select AutoLook from the “EnterAct” menu. It explains itself. For
  1117. a quick look at a definition, either click just after a term or
  1118. double-click on it: the definition will appear instantly in the
  1119. AutoLook window.
  1120.  
  1121. As an AutoLook example, return to the “minimalApp7.c” window and
  1122. double-click on gEvtDetails, on the same line as WaitNextEvent(:
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.  
  1135.  
  1136.  
  1137.  
  1138.  
  1139.  
  1140.  
  1141.  
  1142.  
  1143. You will see a definition of gEvtDetails appear immediately in the
  1144. AutoLook window. And, you also see a complete definition of
  1145. EventDetails. 
  1146.  
  1147. As you can see, the AutoLook window resolves variable, struct, and
  1148. typedef tangles to show you all the relevant definitions. It also
  1149. resolves #define’d “aliases” such as “#define H Handle”. For functions,
  1150. you’ll see a prototype, with function name and parameters preselected
  1151. so you can quickly paste a “template” for the function call into your
  1152. code (by switching to the AutoLook window and selecting the command
  1153. Paste Selection Behind). Basically, if the name is defined outside of
  1154. a function body, the AutoLook window will show you the essentials you
  1155. need to  use it. The only requirements are that a file containing a
  1156. definition (or prototype) for the name should be in your project, and
  1157. your dictonary should be up to date for that file.
  1158.  
  1159. As of version 3, EnterAct's AutoLook window will also display
  1160. definitions of local variables, and provide more useful lookup for
  1161. struct and class member names when you double-click on them or
  1162. click after them. For this to work, your file should be a source
  1163. (left pane) or header file, though not necessarily added to your project,
  1164. and you should have your dictonary reasonably up-to-date.
  1165.  
  1166. And AutoLook will also display relevant definitions when you type
  1167. the name of a struct, class, or union member.
  1168.  
  1169. By itself, the AutoLook window can supply most of the details you need
  1170. to program or review nonstop. However, the display in this window is
  1171. transient, keeping up with you as you click or double-click about, or
  1172. type for that matter. To produce a more permanent display of a
  1173. definition or prototype, more work is required on your part: you have
  1174. to press the <Enter> key. To see it work, double-click on EventDetails
  1175. in the AutoLook window, and then press the <Enter> key:
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196.  
  1197.  
  1198.  
  1199.  
  1200.  
  1201.  
  1202.  
  1203.  
  1204.  
  1205. Your screen may not look exactly like that, but you should see the
  1206. definition of EventDetails appear in a separate window, called a
  1207. “lookup” window.
  1208.  
  1209. A press of the <Enter> key produces a separate window containing the
  1210. information you’re after, definition or prototype.  As you’ll see
  1211. shortly, these separate “lookup” windows can take care of themselves.
  1212. And the “press <Enter>” style of lookup also works when your spelling
  1213. of a term is off, but still “distinctively close”.
  1214.  
  1215. In general, you can look up any function, method, struct class union
  1216. or enum tag, enum constant, typedef, or variable (including low–memory
  1217. and statics) that is defined or mentioned anywhere in your .c or .h
  1218. project files outside of a function, struct, or union body—and any
  1219. #define’d constant or macro that is defined outside of a function body.
  1220. In other words, just about everything of interest except local
  1221. variables or any other “thing” which is meant to be used only within
  1222. a single specific function. Note the AutoLook window does show local
  1223. variables and data members.
  1224.  
  1225. As you’ve seen, the fastest and easiest way to look up a definition
  1226. for a term is to double-click on it with the AutoLook window on-screen.
  1227. You can also click just after the term, or type it, and the AutoLook
  1228. window will keep up. It will also often show class member and
  1229. inline method definitions, after a slight delay.
  1230.  
  1231. However, the AutoLook window has three shortcomings:
  1232.     •    the display lasts only until you look up some other term
  1233.     •    your spelling of the term must be correct
  1234.     •    the display in the AutoLook window doesn’t update as you click about
  1235.         or edit in the AutoLook window itself.
  1236.  
  1237. To overcome these shortcomings, the “press <Enter>” style of lookup
  1238. produces a separate window holding one or more definitions of the term
  1239. being looked up. To look up a term in this way:
  1240.     •    double-click on it, or click just to the right of it, or type it in
  1241.     •    and press the <Enter> key.
  1242.  
  1243. A dictionary entry for the term will appear in a new small text window,
  1244. called a “lookup” window. Lookup windows are mostly like text windows,
  1245. the key differences being that they cannot be directly saved (Copy and
  1246. Paste to a real text window to do that), and they usually can show you
  1247. other dictionary entries. Only one is shown at a time. If your spelling
  1248. is off, the window will show best guesses rather than exact matches.
  1249. (To view other entries, <Option>click in the title bar.)
  1250.  
  1251.  
  1252. (§)    Lookup window frames
  1253. In the small display box along the bottom of the lookup window you will
  1254. see: the name of the file from which the entry was taken; the kind of
  1255. term it is (a one–letter abbreviation, for example “v” for variable,
  1256. “(” for a function, “s” for a struct); and two numbers—the current
  1257. entry you are viewing, followed by the total number of entries
  1258. currently stored in the lookup window. 
  1259.  
  1260. The title of the lookup window will be the term you wanted looked up,
  1261. preceded by two bullets, eg “••EventDetails”. The two bullets are a
  1262. sign that the window is a (temporary) lookup window, not a regular
  1263. document window.
  1264.  
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274. (§)    Viewing other entries in a lookup window
  1275. A lookup window may hold additional definitions if:
  1276.     •    there are variant definitions of the same term, such as defining
  1277.         and declaring instances of a global variable, or prototype and defining
  1278.         instance of a function
  1279.     •    the same term is used in different ways, such as a struct and a
  1280.         typedef with the same name
  1281.     •    your spelling of the term was incorrect: in this case, closest
  1282.         matches will be shown, and the number shown is under your control.
  1283.  
  1284. Numbers in the display box of the lookup window indicate which entry
  1285. you’re viewing, followed by the number of entries available: if the
  1286. numbers read “1/1”, then only one is present; whereas if the second
  1287. number is greater than one (from “1/2” up to “1/60”) then more entries
  1288. are “stacked up” in the window.
  1289.  
  1290. To view a different entry, hold down the <Option> key and
  1291. click-and-drag in the window’s title bar to select from a popup menu.
  1292. To produce a sample, type "KeyDetails" in any text window and press
  1293. <Enter> to produce a regular lookup window; this term doesn’t match
  1294. anything in the project, so closest matches are shown. From the
  1295. designation “1/4” in the display box, you can tell that four entries
  1296. are contained in the lookup window. To access them, hold down the
  1297. <Option> key, click in the title bar of the “••KeyDetails” lookup
  1298. window, and select from the resulting popup menu:
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316. You can use <Command> instead of <Option> to view popups if you prefer.
  1317. (Truncated full path names are also shown in the popup menu,
  1318. to help you pick the exact definition you want.)
  1319.  
  1320. Each entry in the popup begins with a one-character “hint” describing
  1321. the definition type, eg “t” for typedef, “v” for variable, “(” for
  1322. function. For a complete list, see “Hints with lookup” in the “Lookup”
  1323. chapter.
  1324.  
  1325. You can also cycle forwards through the entries in a popup window by
  1326. repeatedly pressing the <Enter> key. Press <Option><Enter> to cycle
  1327. backwards. Normally <Option>-clicking in the title bar is handier because
  1328. it gives you an overview of all the entries.
  1329.  
  1330.  
  1331. (§)    The <Enter> key
  1332. In any text window including lookup windows, pressing the <Enter> key
  1333. with an insertion point means “look it up”. The I–beam should be just
  1334. to the right of the term you want looked up. Pressing the <Enter> key
  1335. when characters are selected also activates regular lookup in a
  1336. non-lookup window, and in a lookup window the result of pressing
  1337. <Enter> is either regular lookup or cycling to the next match. In a
  1338. lookup window, if the selection agrees with the name of the term being
  1339. displayed or if your selection is so large that lookup cannot be done,
  1340. then <Enter> will cycle you to the next entry; conversely, if your
  1341. selection is not the name of the definition being shown and your
  1342. selection could be looked up (one word, or two words separated by
  1343. colons) then <Enter> will look up your selection.
  1344.  
  1345. Note that pressing the <Enter> key for separate lookup is meant
  1346. for use with names that are in your dictionary, and in particular
  1347. local variables are not included. To look up the struct or class
  1348. that contains a particular member, press <Shift><Enter> as
  1349. described below.
  1350.  
  1351. Whenever you display a new definition in a lookup window, a selection
  1352. in the window is made for you. Among other things, this selection
  1353. guarantees that if you press <Enter> or <Option><Enter> you will cycle
  1354. back and forth through the definitions, rather than looking something
  1355. up.
  1356.  
  1357. Basically, you don't have to remember anything here since it all comes
  1358. down to intention: if you intend to look up a name, selecting it and
  1359. pressing <Enter> will do just that. If you intend to cycle to the next
  1360. match, pressing <Enter> will do that instead. In the rare case that
  1361. you change the default selection in the window and then wish to cycle,
  1362. either pick from the popup menu or do a Select All before pressing
  1363. <Enter>.
  1364.  
  1365.  
  1366. (§)    Looking up something in a lookup window
  1367. Click to get an insertion point just to the right of the name you want
  1368. looked up, and press <Enter>. With any name except the name of the
  1369. definition currently being shown in the lookup window, you can also
  1370. double-click on the name and press <Enter>.
  1371.  
  1372.  
  1373. (§)    Keeping the lookup around
  1374. You can adjust the maximum number of lookup windows you wish to have
  1375. on–screen at one time, with the Options command: when this limit is
  1376. reached and you press <Enter> to see another lookup, one of the lookup
  1377. windows that is currently on–screen will quietly go away to make room
  1378. for the new one. To prevent this happening to a lookup window that
  1379. you’d like to keep around, select Keep Lookup Around from the windows
  1380. menu while the lookup window is in front. It will then stay on–screen
  1381. until you close it, or until you close the project. When you “keep
  1382. around” a lookup window, the two bullets “••” at the start of the
  1383. window title will change to “¶¶” to help you distinguish the keepers
  1384. from the ones that might go away later.
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396. (§)    If your spelling is off
  1397. If you press <Enter> for lookup and your spelling did not match any
  1398. term in your dictionary exactly, then you’ll see whatever entries come
  1399. closest, with suppression of variants on the same name in order to
  1400. maximize the variety shown. The entries will be presented in order from
  1401. best match to worst as you press <Enter>. EnterAct is very nearly as
  1402. good at judging what’s close as you are, even though it doesn’t
  1403. “understand” the terms being looked up. This perhaps surprising ability
  1404. results from the natural tendency to give distinctly different names
  1405. to terms with distinctly different meanings. You’ll find more about
  1406. this in the “Lookup” chapter, but EnterAct’s lookup power is sufficient
  1407. that one guideline is all you need: when you’re not sure of the correct
  1408. spelling, type your best guess, remembering that C is case–sensitive.
  1409. EnterAct will almost always retrieve what you want on the first try,
  1410. among the first three entries in the lookup window.
  1411.  
  1412. For an example with Minimal App, see the "KeyDetails" illustrations
  1413. a couple of pages back.
  1414.  
  1415. (§)    Adjusting the number of lookup windows and entries shown
  1416. EnterAct comes preset with a maximum of four lookup windows on–screen
  1417. at one time, and a maximum of four entries per lookup window. You can
  1418. change these limits at any time by selecting the Options command under
  1419. the Edit menu. For complex problems, you may want more lookup windows.
  1420. If your recollection of the spelling of a term has gone out the window,
  1421. you may want to temporarily increase the number of alternate entries
  1422. returned per lookup window. You can vary the number of lookup windows
  1423. from 1 to 10, and the number of entries per window from 1 to 20.
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446. (§)    Working with lookup windows
  1447. You’ll probably find that the AutoLook window by itself can handle more
  1448. than half of your information retrieval needs. And often you’ll want
  1449. to have more permanent separate lookup windows showing data structures
  1450. that you’re working with for more than a moment, and transient lookup
  1451. windows to supplement the AutoLook display. Separate lookup windows
  1452. are generated by double-clicking on or clicking after a name and
  1453. pressing the <Enter> key, and made permanent by selecting Keep Lookup
  1454. Around (the key equivalent <Command><K> is a good one to memorize).
  1455.  
  1456. To help you manage lookup windows EnterAct places, sizes, scrolls, and
  1457. makes selections in them for you, and also closes old lookup windows
  1458. to make room for new ones. But the lookup windows have to go somewhere
  1459. on your screen(s), and you’ll find the lookup process goes more
  1460. smoothly if you leave some screen area free for the lookup windows to
  1461. occupy. How much room you leave for lookup windows is best judged by
  1462. experience, and will vary according to the needs of the moment. Some
  1463. things to keep in mind:
  1464.     •    lookup windows ignore the project window when looking for a place
  1465.         to appear
  1466.     •    lookup windows prefer to occupy a small place rather than cover one
  1467.         of your working windows
  1468.     •    if some window has to be covered by a lookup window, the lookup
  1469.         window will try to avoid your front two windows
  1470.     •    lookup windows will try to appear right next to your front window,
  1471.         preferably below or above it.
  1472.  
  1473. (§)    Reverse lookup (<Shift><Enter>)
  1474. On occasion you may find yourself viewing a member name and wondering
  1475. what struct, union, or typedef contains it. Quite often, the AutoLook window
  1476. will immediately display the definition you want. If not, double-click
  1477. on or click after the member name and press <Shift><Enter> to invoke
  1478. EnterAct's "reverse lookup".
  1479.  
  1480. Here’s the result of double-clicking on "ioFDirIndex" and pressing
  1481. <Shift><Enter>:
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497. (Note pressing just <Enter> would have produced the definition
  1498. of ParamBlockHeader, not a list of structs or classes that
  1499. contain it)
  1500.  
  1501. As with all lookup windows, you can access the other definitions
  1502. stacked up in it by holding down the <Option> key and clicking in the
  1503. title bar to choose from a popup menu. 
  1504.  
  1505. Reverse lookup is not case-sensitive. Although it is called “struct
  1506. for member”  lookup elsewhere, it is actually slightly more, since it
  1507. attempts to match your selection with something in a struct, union,
  1508. or typedef without regard for whether it is a member name. Reverse
  1509. lookup accepts arbitrary strings of text up to 255 characters (for this
  1510. you’ll have to select the text to be looked up and then press
  1511. <Shift><Enter>) and will match it against anything in a definition,
  1512. even inside a comment. Aside from being case-insensitive, reverse
  1513. lookup requires exact spelling—but your selection can be just part of
  1514. a word, or several words with punctuation included.
  1515.  
  1516. The AutoLook window will usually show struct-for-member
  1517. lookup for a term. If you're inside a function in a source file then
  1518. AutoLook will be on average more accurate at providing the correct
  1519. definition. In any case, only the first containing struct or class will be
  1520. shown. This lets you see prototypes for inline method definitions that are
  1521. entirely contained in a class definition, and "fDataMembers", as
  1522. well as regular struct definitions for some member.
  1523.  
  1524.  
  1525. (§)     “Sounds like” (phonetic) lookup
  1526. The situation: “I’m desperate, show me a definition even if it’s wrong,
  1527. all I can tell you is the name sounded something like this:”. The
  1528. answer: type your guess and press <Option><Enter>. Your guess will be
  1529. boiled down to a string of standard consonants, then compared with
  1530. boiled-down versions of all your dictionary terms, and you’ll be shown
  1531. the best matches. <Option><Enter> is not case-sensitive (it's only
  1532. barely vowel-sensitive), and should be kept in mind as an
  1533. emergency backup, for those rare occasions when regular lookup gives
  1534. up on you.
  1535.  
  1536. (§)    Seeing where a term is defined
  1537. The simple way is to <option> double-click on the term. To jump to the
  1538. definition of a scoped name such as "thisClass::thatMethod()",
  1539. <option>double-click on one of the names without releasing the mouse
  1540. after the second click. drag over to include the other name, and let go.
  1541.  
  1542. The "Find Definition" command does the same thing as <option>
  1543. double-click, but also lets you select part of a word, such as just
  1544. the "WindowData" part of "WindowDataPtr", before jumping away.
  1545.  
  1546. As a Minimal App example, open a new window if you haven’t done so,
  1547. type "gacc" , and <Option> double-click on it:
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561. You’re viewing the definition of the static variable gacc , which is
  1562. used for communicating with Drag_on Modules. You will also be able to
  1563. jump to the definitions of static functions, #define’s, struct, union,
  1564. enum, and class tags, enum constants, typedef’s, methods—in other
  1565. words, anything defined at the top level in your source files.
  1566.  
  1567. If a member name is unique (used only in one struct, class, or
  1568. union) you can <option>double-click on it reliably.
  1569.  
  1570. If you can’t jump to a definition because your spelling is wrong, first
  1571. look up the correct spelling first by clicking after the name and
  1572. pressing the <Enter> key. Then, you can <option> double-click on the
  1573. correctly-spelled name right in the lookup window.
  1574.  
  1575. For the special case of multiple definitions of a term (eg several static
  1576. variables with the same name), you need to tell EnterAct which one you
  1577. want, and the way to do that is to do your <option>double-click in a
  1578. lookup window that is displaying the exact definition you want. So
  1579. the sequence is:
  1580.     •    look the name up (select it, press <Enter>)
  1581.     •    use the lookup window's popup menu to find the exact definition
  1582.         you want (<option>click in the window's title bar, and look at the
  1583.         truncated full path names shown beside each instance)
  1584.     •    after picking the one you want from the popup menu, double-click
  1585.         on the term and off you go.
  1586.  
  1587. Doing your <option>double-click in the AutoLook window won't work
  1588. reliably with terms that have multiple definitions.
  1589.  
  1590. If you're mildy annoyed at this point, use just the AutoLook
  1591. window for a while, it will cheer you up.
  1592.  
  1593. (§)    Balance
  1594. Balance checks all of the paired delimiters in C (with the picky
  1595. exception of angle brackets <>). If you select an insertion point at
  1596. the top of a file (with <Option><up arrow>, or Go to Top), Balance will
  1597. balance your entire file. If any error in balance is detected, you’ll
  1598. be shown the mismatched or unmatched delimiter. When balancing a file,
  1599. if you hear a beep and the insertion point remains at the top of the
  1600. file, that means your whole file balanced.
  1601.  
  1602. As a shortcut, you can double-click on a delimiter.
  1603.  
  1604. Balance also detects nested comments, and more importantly any single
  1605. failure to properly start or end a comment, something even most
  1606. compilers don’t do. Since EnterAct’s dictionary–builder checks comments
  1607. fully, simply by building the dictionary you will guarantee that no
  1608. improper comment in any of the included source files will ever generate
  1609. a wild pointer or an uninitialized variable.
  1610.  
  1611. If your source code deliberately contains nested comment starts, select
  1612. the Options command and uncheck the “Detect nested comment starts” box
  1613. in the "Parse" panel.
  1614.  
  1615. (§)    Searching
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628. The Find dialog in EnterAct is modeless, which means that when the Find
  1629. dialog is in front any search command you pick will apply to the window
  1630. just behind it. An important exception is Replace All, which works only
  1631. when a text window is in front. 
  1632.  
  1633. The "Find" button in the dialog is the exact equivalent of the
  1634. "Find Again" menu command. Both can be used with the project
  1635. window itself by the way, to find file names in long lists.
  1636.  
  1637. A popup menu at the top of the Find dialog remembers the 20 most recent
  1638. strings of characters that you have searched for.
  1639.  
  1640. The little buttons in the lower–right of the Find dialog allow to to
  1641. set up a “coarse” multi–file search of your project files. As you click
  1642. them, you’ll see bullets appear beside files to be searched in your
  1643. project window. 
  1644.  
  1645. If you click the "Batch" check box, your multi-file search will be
  1646. done all at once, and the results presented in a text window
  1647. (file name, line number, and the full line where found). To go to
  1648. a particular found instance, click on the line and use "Go to...".
  1649.  
  1650. To “fine–tune” your multi–file selection, hold down the <Option> key
  1651. and click on or drag over the file names right in the project window.
  1652. Try it out now by clicking and dragging in your project window with
  1653. the <Option> key down and you’ll see that it acts as a toggle,
  1654. selecting files if they were not selected and vice versa. Your
  1655. multi-file selection can also be used with the Remove •'d Files
  1656. command, and as input to a hAWK program (which makes setting up a
  1657. program run a trivial thing).
  1658.  
  1659.  
  1660.  
  1661.  
  1662.  
  1663.  
  1664.  
  1665.  
  1666.  
  1667.  
  1668.  
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674. (§)    Adding marks to a source file
  1675. EnterAct's default behaviour is to automatically provide marks for
  1676. all functions, methods, structs and classes in a source or header
  1677. file, to append a brief summary of arguments for all functions
  1678. and methods, and to not save the marks with the source or header
  1679. file. For documentation, EnterAct does no automatic marking but
  1680. does save any marks that you add manually when you save the
  1681. file. Normally this is all you need.
  1682.  
  1683. To access the popup menu listing marks for a file, hold down the
  1684. <Option> or <Command> key and click-and-drag in the title bar of the
  1685. file’s window. Just select a mark and off you go.
  1686.  
  1687. EnterAct’s markers are compatible with THINK C and MPW, indeed the
  1688. suspicion is that there is only one kind of marker in the universe.
  1689.  
  1690. Markers can be added “manually’” to a document, most commonly to
  1691. mark section or chapter headings in your documentation. For an example,
  1692. see the online version of this manual, or the “hAWK User’s Manual”.
  1693. For the details on markers, please see the
  1694. «18   Markers and the Locations menu» chapter.
  1695.  
  1696. The "Automark" command under the Search menu provides some
  1697. additional options. But the slight advantage of being able to
  1698. mark additional points in your source file is usually outweighed
  1699. by the nuisance of having to use the "Automark" command when
  1700. you change the file. See the «18   Markers and the Locations menu»
  1701. chapter for details, but I'd recommend against using the
  1702. "Automark" command in its present form. If you would really like
  1703. a more useful version of this command, let me know
  1704. (kearle@interlog.com). Here's what the dialog looks like:
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720. (§)    Going to markers in other files
  1721. As an aid to linking source files with supporting documentation,
  1722. EnterAct gives you a way to jump to a marker in any project file. This
  1723. is done by selecting text in any window that consists of a project file
  1724. name followed by a marker name, and then issuing the "Go to..." command.
  1725.  
  1726. EnterAct can generate the necessary file name and marker name for the
  1727. link, as follows:
  1728.     •    in the window for the document in whch the marker is defined, access
  1729.         the marker menu and pick the mark, but in addition to holding down the
  1730.         <Option> or <Command> key hold down the <Shift> key as well
  1731.     •    the necessary text will be placed on the clipboard, ready for
  1732.         pasting. The file name and marker name will each be surrounded by «»
  1733.         quotes, which are optional but help the text to stand out.
  1734.     •    since you ended up at the mark's location as a side-effect, you
  1735.         can get back to your original location in the file by using the
  1736.         Go Back command.
  1737.     •    to generate the text for all markers in one or more files, you
  1738.         can use the "Index Marker Names..." command (chapter 22). However,
  1739.         this works well only with documentation, since the marks for
  1740.         source and header files are by default not saved.
  1741.  
  1742. A typical “Go to” link looks like
  1743. ____
  1744.     /* See «EnterAct 4 Manual» «13   Documents and windows» */
  1745. ____
  1746. and if the file “EnterAct 3 Manual” has been added to your current project
  1747. then you can jump to the marker named “13   Documents and windows” by
  1748. clicking anywhere on the line and using the "Go to..." command. Try it now
  1749. if you're using EnterAct, then come back here with the "Go Back" command.
  1750.  
  1751. The advantage of this kind of link is that since the marker position
  1752. is maintained as you edit, so is your link. With this
  1753. «file name»«marker name» style of link, both file and marker name can be
  1754. abbreviated, and the link is immune to minor variations in spelling.
  1755.  
  1756. Many variations on “Go to” are available, such as going to a file-name
  1757. line-number, or just a file name, marker name, or line number. For
  1758. details, see the “‘Go’ commands” chapter.
  1759.  
  1760.  
  1761. (§)    Keeping track of things
  1762. When you close a project, it remembers which project text files you
  1763. have open. Later, when you reopen the project, those text files are
  1764. reopened as well. This makes it a little easier to pick up where you
  1765. left off. You could call this “context restoration”, though some like
  1766. to call it the “painless Quit”. It’s all automatic—just close the
  1767. project before you close your working files, or if you’re quitting,
  1768. don’t bother to close your working files first.
  1769.  
  1770. The concept of “undo” takes a step forward with EnterAct’s Show
  1771. Activities command, which displays the last 10,240 things you have done
  1772. with EnterAct. Descriptions are in plain English, and full contents
  1773. of edits are shown. A typical entry looks like this:
  1774. ____
  1775.  
  1776. ¶45
  1777. Tue, Mar 9, 1993 7:45:11 pm TYPING «Untitled-1» 1 1 (obs)
  1778. =>inserted 15 characters:
  1779. «AdjustTheCursor»
  1780. ¬
  1781.  
  1782. ____
  1783. —where “«Untitled-1» 1 1 (obs)” means the action started in the
  1784. “Untitled-1” window at line 1, character 1 on the line (ie the start
  1785. of the file), and the typing is now “obsolete”, ie it was never saved
  1786. to disk before closing the window. The “file name - line number” part
  1787. of the activity record is compatible with EnterAct’s “Go to” command.
  1788. And the full contents of all inserts and deletes are shown, up to a
  1789. very large limit. By using "Go to" and the contents of the activity
  1790. record you will be able to locate and selectively undo any of your
  1791. recent activities, provided that you haven’t destroyed the context of
  1792. the edit with a huge delete or by erasing the corresponding file. To
  1793. help you locate the edit position, Show  Activities provides the option
  1794. of correcting the original positions of edits to reflect the effects
  1795. of other edits, which is normally what you’ll want when reviewing or
  1796. selectively undoing your recent activities.
  1797.  
  1798. Since there are new concepts here, the “Show Activities” chapter goes
  1799. into considerable detail on such topics as “obsolete edits” and
  1800. “updated activity positions”. Once you’ve read through it, you’ll
  1801. realize you knew most of it already—you just didn’t talk about it much
  1802.  
  1803. EnterAct saves your activities to a disk log as you work. So “undo”
  1804. capabilities are not lost just because you quit and restart.
  1805.  
  1806. There is a way to undo files (one at a time) back to specific
  1807. activities. This involves the use of a hAWK program, and you’ll find
  1808. the details in the “Show Activities” chapter. If you anticipate needing
  1809. to do this, I would recommend using some sort of real version control
  1810. rather than EnterAct to revert a file to a previous state.
  1811.  
  1812. Though you haven’t done much yet, it wouldn’t be a bad idea to call
  1813. up the Show Activities dialog, pick any old options, click the OK
  1814. button, and see what happens. Not something you’ll use every day, but
  1815. your last ten thousand activities are still there if you need to review
  1816. or undo them, or figure out what the heck you just did.
  1817.  
  1818.  
  1819. (§)    Classes and methods
  1820. When you build yourself a project that contains classes, try out the
  1821. Browse command to see a graphic view of your classes. Double–click on
  1822. a class name to view the class definition, click–and–hold briefly on
  1823. a class name to select from a list of methods, and then view the method
  1824. definition. If you’re new to C++ or Java, you’ll find no better
  1825. way to learn than by exploiting EnterAct’s project–building, lookup,
  1826. and browsing power—in fact, you might want to build a project for a
  1827. TCL or PowerPlant demo or somesuch right now.
  1828.  
  1829.  
  1830.  
  1831.  
  1832.  
  1833.  
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.  
  1856. (Color is recommended for viewing the browser)
  1857.  
  1858. (§)    Little things worth knowing
  1859. If you hold down the <Option> key while clicking in the zoom box of
  1860. a window, only the length will be zoomed. Without covering up your
  1861. AutoLook window.
  1862.  
  1863. When you double–click on a file in the project window to open the file,
  1864. the project window will retreat behind all other windows. You can bring
  1865. it to the front with <Command><zero>. Even on small screens this allows
  1866. you to have a large project window and use it conveniently as a “mini
  1867. Finder”.
  1868.  
  1869. Paste preserves relative indentation, at least in the commonest
  1870. situations where you would want your indentation to be retained( see
  1871. the “Paste preserves indentation” section in the “Editing” chapter).
  1872.  
  1873. Windows remember their last saved location, unless you select otherwise
  1874. from the Options dialog. 
  1875.  
  1876. EnterAct takes special care of your text documents, ensuring
  1877. that disk files are updated when you leave EnterAct, and windows
  1878. are updated when you return to EnterAct (see “Switching to other
  1879. applications”). This is the default behaviour. You can turn off the
  1880. automatic saving and restoring if you want--but keep in mind that
  1881. the "Show Activities..." command can show you the last 10,000
  1882. things you did, in the rare case where you chop something important
  1883. out of a file and then switch out.
  1884.  
  1885. Reformat Selection is handy for making comments pretty again after
  1886. you’ve chopped them up (it’s undoable, and some options are available
  1887. in the Options dialog). 
  1888.  
  1889. There are some other things worth trying out, such as full Drag and Drop
  1890. for text, code templates, Dual Batch Find -- hey, take a browse through
  1891. the rest of the manual when you have a minute.
  1892.  
  1893.  
  1894. (§)    Source code restrictions (don't panic)
  1895. There are three sorts of code constructions that are nominally correct,
  1896. but throw off EnterAct’s dictionary–builder. Please read the next
  1897. chapter "Source code restrictons" if the very notion bothers you.
  1898. Or just go ahead and use EnterAct, but remember that if you do
  1899. run into a problem while building your dictionary there are simple
  1900. workarounds for all problems in the "Source code restrictons" chapter.
  1901.  
  1902.  
  1903. (§)    Onwards
  1904. If you’ve tried things out for yourself while taking this tour, I
  1905. expect you know enough about EnterAct to begin using it full–time for
  1906. code creation and review—aside from knowing when to poke the <Enter>
  1907. and <Option> keys, there isn’t much to the basics. Eventually, alas,
  1908. you should probably read the rest of the manual. Personally, I enjoy
  1909. reading manuals.
  1910.  
  1911. To acquaint yourself with hAWK and Read Resource, add the “hAWK
  1912. User’s Manual” and “Read Resource Manual” to an EnterAct project and
  1913. follow the instructions therein. Learning Read Resource is a 5 minute
  1914. job. hAWK is rather more complicated, but it’s a powerful, widely–used
  1915. little language and learning it should prove well worth the effort.
  1916. Running hAWK programs is easy, at least, and many useful programs are
  1917. included.
  1918.  
  1919.  
  1920. -    -    -    -    -    -    -    -    -    -    -    -
  1921. Source code restrictions (ayeee! I knew it!!) - don't panic
  1922. -    -    -    -    -    -    -    -    -    -    -    -
  1923. §    Why not just compilable code?
  1924. EnterAct is able to identify terms in your code and correctly deduce
  1925. the type and definition of each term without doing extensive
  1926. preprocessing or semantic analysis. The benefits are lightning speed,
  1927. considerable tolerance of first–draft errors, and full information
  1928. retrieval, definition finding, browsing, and automatic marker placement
  1929. available right from the beginning of the code creation process. This
  1930. is all made possible with EnterAct’s Heuristic Adaptive Reentrant
  1931. Parser, which is based on a description of the way people actually
  1932. write code and the importance they attach to various constructs,
  1933. rather than on the textbook prescription. The drawback is that EnterAct
  1934. cannot deal with absolutely everything that is possible in C/C++/Java, and
  1935. some minor restrictions must be satisfied in order for the
  1936. dictionary–builder to deal properly with your code.
  1937.  
  1938. In practice, only the “illegal aliases” will present a significant
  1939. problem if present, in that the only workaround is to remove them
  1940. (have you ever seen one? me neither...).
  1941. Obviously-unnecessary parentheses will result in extra or missing
  1942. dictionary entries for some terms. Troubles with aliases and
  1943. parentheses are extremely rare, since they obfuscate the source code
  1944. for beginner and expert alike. To overcome problems with nested comment
  1945. starts or “all-or-nothing macro’s”, you just need to make EnterAct
  1946. aware that they are present, as explained below.
  1947.  
  1948.  
  1949. §    Aliases
  1950. Defined equivalents for certain keywords and punctuation should be
  1951. avoided. A defined equivalent or alias takes the form
  1952. ____
  1953.     #define    Record     struct
  1954. ____
  1955. for example. EnterAct won’t know that “Record” is supposed to mean
  1956. “struct”, and the dictionary–builder won’t work well at all.
  1957.  
  1958. Keywords that should not be aliased:
  1959. ____
  1960.     asm        enum        pascal        Pascal        struct        typedef    
  1961.     union        void        class
  1962. ____
  1963.  
  1964. Punctuation that should not be aliased:
  1965. ____
  1966.     ;    :    ,    \    "    '    {}    ()    []    /    *    =
  1967. ____
  1968.     
  1969. You will never see aliases for any of these in published code, or in
  1970. any code intended to be read by more than one person, for the simple
  1971. reason that such a creature as
  1972. ____
  1973.     Record fileData BEGIN int x SEMI END SEMI
  1974. ____
  1975. would be rather difficult for anyone but the author to read.
  1976. Other aliases, such as
  1977. ____
  1978.     #define    EQ    ==
  1979. ____
  1980. are perfectly OK, by the way.
  1981.  
  1982. §    Obviously unnecessary parentheses
  1983. These are just as rare as the aliases above. This restriction applies
  1984. only outside of function bodies and refers only to parentheses that
  1985. would result in a variable declaration resembling a function
  1986. declaration. An example would be
  1987. ____
  1988.     Peter    (Harvey);
  1989. ____
  1990. Right now you know as much as EnterAct does when it runs into this sort
  1991. of thing—is it a variable declaration or a function declaration? You
  1992. may have deduced that the above declaration is almost certainly for
  1993. a function “Peter” returning an (implicit) int, since you would never
  1994. type those parentheses in a simple variable declaration,
  1995. ____
  1996.     int    (x);
  1997. ____
  1998. —these are an example of what is meant by “obviously unnecessary
  1999. parentheses”, namely parentheses that make the code harder to read,
  2000. not easier. If you avoid these excessive parentheses when declaring
  2001. variables outside of a function, that’s all that’s needed. Once again,
  2002. you won’t see them in any published code, and even beginners feel that
  2003. such parentheses make life harder, not easier.
  2004.  
  2005.  
  2006. §    Nested comment starts
  2007. This refers to two consecutive comment starts with no intervening
  2008. comment end, eg
  2009. ____
  2010.     /*#define    DEBUG    /* some comment here */
  2011. ____
  2012. where the intent is to define or undefine DEBUG by removing or
  2013. replacing the first comment start. If your code employs this (lazy)
  2014. sort of construct, then instruct EnterAct that this is not an error
  2015. by selecting Options… from the Edit menu and removing the check mark
  2016. from the box titled “Detect nested comment starts”. There is an
  2017. illustration of this in the “Options” chapter, by the way. As a
  2018. side-effect, EnterAct will not be able to warn you if a comment end
  2019. has accidentally been omitted.
  2020.  
  2021. If you value the notion that EnterAct can fully trap any single failure
  2022. to properly start or end a comment (something that many compilers,
  2023. including THINK C, don’t do), then leave the check mark in the  “Detect
  2024. nested comment starts” box, and remove the nested comment starts from
  2025. your code. Simplest, use "//" style comments instead.
  2026.  
  2027. §    Preprocessor tangles
  2028. Although these do pop up, they're easy to fix up. 
  2029.  
  2030. Conditional #defines which duplicate important punctuation can
  2031. cause trouble, such as
  2032. ____
  2033.     #ifdef GO_LONG
  2034.     long GetArrayIndex(void) {
  2035.     #else
  2036.     short GetArrayIndex(void) {
  2037.     #endif
  2038. ____
  2039. —EnterAct will complain about the '{' being there twice, and
  2040. the simple fix is to put the curly brace (which isn't conditional
  2041. anyway) after the conditional part:
  2042. ____
  2043.     #ifdef GO_LONG
  2044.     long GetArrayIndex(void)
  2045.     #else
  2046.     short GetArrayIndex(void)
  2047.     #endif
  2048.     {
  2049. ____
  2050.  
  2051. EnterAct's parser can sometimes spazz out because it's trying to
  2052. handle C and C++ and first-draft code and all possible values of
  2053. a #define all at once. For example,
  2054. ____
  2055.     typedef struct A
  2056.     #ifdef __cplusplus
  2057.     : public B
  2058.     #endif
  2059.     {
  2060. ____
  2061. used to generate a complaint, and there may still be similar constructs
  2062. out there that cause a problem. The fix is to provide the full C and
  2063. C++ introductions separately, as in
  2064. ____
  2065.     #ifdef __cplusplus
  2066.     struct A : public B
  2067.     #else
  2068.     typedef struct A
  2069.     {
  2070. ____
  2071.  
  2072. And one more tangle: if you put something that's deliberately
  2073. uncompilable in your code, avoid all punctuation except commas
  2074. and semicolons (some few others might work). For example,
  2075. ____
  2076.     #ifdef A_Compiler
  2077.     #ifdef B_Compiler
  2078.     error - won't you please make up your mind?!
  2079.     ...
  2080. ____
  2081. would trip EnterAct, whereas
  2082. ____
  2083.     #ifdef A_Compiler
  2084.     #ifdef B_Compiler
  2085.     error, please make up your mind
  2086. ____
  2087. while lacking punch, would work fine from EnterAct's view.
  2088.  
  2089. §    All–or–nothing macro’s
  2090. This final restriction is one that you may run into, but the workaround
  2091. is easy.
  2092.  
  2093. An “all–or–nothing” macro is a macro that looks something like
  2094. ____
  2095.     #ifdef        BLUETREECOMPILER
  2096.     #define P(x)     x
  2097.     #else    /* some other compiler */
  2098.     #define P(x)
  2099.     #endif
  2100. ____
  2101. —so P(x) either does nothing at all to its argument or it “eats” the
  2102. argument, but either way the macro itself disappears from the code.
  2103. If such a macro is the very first thing in a statement then EnterAct
  2104. will deal with it correctly, for example "P(typedef  int  INT16;)"
  2105. would result in INT16 being recorded as a typedef’d equivalent of
  2106. “int”. 
  2107.  
  2108. However, if the all–or–nothing macro is not the very first thing in
  2109. the statement, as in
  2110. ____
  2111.     int myFunc P((int x, long y));
  2112. ____
  2113. then EnterAct will mistakenly record “P” and not “myFunc” as the
  2114. function name, and in general it will misrecord any similar statement
  2115. where an–or–nothing–macro isn’t the first thing in the statement.
  2116.  
  2117. In case you’re wondering, the intention of
  2118. ____
  2119.     int myFunc P((int x, long y));
  2120. is to produce either
  2121.     int myFunc (int x, long y);
  2122. or
  2123.     int myFunc ();
  2124. ____
  2125. —in other words either a proper modern prototype or an old–fashioned
  2126. declaration, and this sort of thing is useful when writing code that
  2127. will be compiled using different compilers.
  2128.  
  2129. What to do? Call up the Macro's to skip dialog from the EnterAct menu,
  2130. and enter the name of the macro there.
  2131.  
  2132. (PLEASE NOTE you may not realize you have an all-or-nothing macro until
  2133. after you have built your dictionary. If this is the case, you should
  2134. completely rebuild your dictionary to ensure that all definitions are
  2135. correct. To completely rebuild your dictionary:
  2136.     •    hold down all three of the <Shift>, <Option>, and <Command> keys
  2137.         while using the mouse to select Update Dictionary from the EnterAct
  2138.         menu.
  2139.  
  2140. )
  2141.  
  2142.  
  2143.  
  2144.  
  2145.  
  2146.  
  2147.  
  2148.  
  2149.  
  2150.  
  2151.  
  2152.  
  2153.  
  2154.  
  2155.  
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163. (This button reads “New projects” if no project is open at the time.)
  2164.  
  2165. -    -    -    -    -    -    -    -    -    -    -    -
  2166. Projects
  2167. -    -    -    -    -    -    -    -    -    -    -    -
  2168. §    Introduction
  2169. Any collection of TEXT or PICT files from up to 6 disks can be added
  2170. to an EnterAct project. The project window displays three lists of
  2171. files in your project, and behind the scenes your project contains a
  2172. dictionary of C/C++/Java term definitions, prototypes, and general notes.
  2173. To create and make use of a project:
  2174.     •    use New Project to create an entirely new project, or use Save As
  2175.         with a project window in front to build on an existing project
  2176.     •    if you have nonstandard file extensions (beyond the usual
  2177.         .c, .h, .cp etc) use the "File Extensions..." dialog to make your
  2178.         project aware of them
  2179.     •    add files to your project, the easiest way being to drag folders
  2180.         or files or aliases onto your project window (note there is no
  2181.         need to select a pane)
  2182.     •    bring your dictionary up to date with Update Dictionary
  2183.     •    pick AutoLook from the EnterAct menu
  2184.     •    thereafter, bring your dictionary up to date whenever you want your
  2185.         dictionary to reflect new or altered definitions.
  2186.     •    to switch to a different project that you've had open recently,
  2187.         <Option> or <Command> click in your current project window's
  2188.         title bar to pick from a popup list (please see "Switching to
  2189.         other projects" below -- <Option>clicking will close all your
  2190.         text windows, whereas <Command>clicking will not)
  2191.     •    things work best if you include definitions for all the
  2192.         names in your source code, especially toolbox terms but also
  2193.         PowerPlant or TCL, and ANSI headers.
  2194.  
  2195. NOTE if a folder's name is in parentheses, the files in it will not
  2196. be added to your project. To exclude a folder such as "Old Source",
  2197. change its name to "(Old Source)".
  2198.  
  2199. The three lists of files in the project window can be used to open
  2200. files, by double-clicking on the file names listed there. You can set
  2201. up a multi-file selection by holding down the <Option> key and clicking
  2202. on or dragging over file names, or select all files of a certain type
  2203. by using the buttons in the Find dialog. Bullets (•) will appear beside
  2204. selected files. This list of files can be used with multi-file
  2205. searching or passed as input to a hAWK program or one of the
  2206. “Index” commands under the EnterAct menu. You can also remove
  2207. the selected files from the project with Remove •'d Files.
  2208.  
  2209. To exclude a file from being built into your dictionary, hold down the
  2210. <Command> key and click on its name (more on this later).
  2211.  
  2212. Other things you can do with the lists of project files:
  2213.     •    Find all or part of a file name (useful with enormous lists, have
  2214.         the project window in front and select the appropriate list before
  2215.         using Find or Find Again)
  2216.     •    Copy a selected file name
  2217.     •    use the up and down arrows to move up and down the file lists, and
  2218.         the left and right arrows to change panes
  2219.     •    type your way to a particular file in a pane, by typing the first part
  2220.         or any distinctive part of the name (priority given in that order)
  2221.     •    open a file by selecting it and issuing the “Go to” command
  2222.  
  2223. The project window goes to the back whenever you open a file from it,
  2224. and is listed under the Windows menu as the first file. Any project
  2225. files that you have open when you close a project are remembered, and
  2226. reopened as you left them when you reopen the project.
  2227.  
  2228. The dictionary is required by regular lookup (click just after a term
  2229. name and press the <Enter> key), and by the AutoLook window which
  2230. displays definitions and prototypes automatically as you edit or mouse
  2231. around. More on this later, of course.
  2232.  
  2233. Only one project can be open at a time. You don’t need to have a
  2234. project open to use EnterAct as an editor.
  2235.  
  2236.  
  2237. §    Project files
  2238. An EnterAct project can track any set of TEXT or PICT files. The source
  2239. and header files don’t have to add up to a compilable
  2240. application—anywhere from one file to part or all of the source and
  2241. documentation for several applications can be an EnterAct project. The
  2242. only practical limit is available memory, since your entire dictionary
  2243. is kept in memory: allow EnterAct 7 Meg if you can, otherwise you
  2244. may have to delete some of the larger unneeded header files from
  2245. your project.
  2246.  
  2247. An EnterAct project can contain files from up to 6 disks. If your
  2248. project files are split across several disks, you should have all the
  2249. disks on–line (mounted) before updating your dictionary or doing things
  2250. with a multi–file selection. EnterAct tracks your disks by name, and
  2251. many other applications do the same, so please ensure that all your
  2252. disks have different names. If you ever find it necessary to move a
  2253. considerable number of files from one folder or disk to another, the
  2254. simplest way to deal with the change in any EnterAct project that
  2255. refers to those files is to throw the project away and create an new
  2256. one. Or, you can use Remove •'d Files (<Option>drag over the file names
  2257. first in the project window so that bullets (•) appear to the left of
  2258. the names) followed by Add Files and then Update Dictionary afterwards
  2259. to update your project. And a third way, slightly more complicated:
  2260.     •    before moving the files, select all files for multi-file ops
  2261.     (call up the Find dialog and click "All")
  2262.     •    run the hAWK program "$EchoFullPathNames", and use
  2263.     Save As to save the resulting list of full path names
  2264.     • move the files
  2265.     • edit the disk or folder names in your list of full path names
  2266.     to reflect the new locations
  2267.     • create a new EnterAct project, hold down the <Shift> key,
  2268.     and select Add Files from List… - double-click on the file
  2269.     you created that contains the full path names.
  2270.  
  2271. (A fourth way to relocate files, activating the "Relocate files
  2272. automatically" option in the Options dialog, works only if all
  2273. your source and header files have unique names within the
  2274. context of their disks, and works only if you change the folder
  2275. where they reside - it doesn't work if you change disks. Use of
  2276. this option is NOT recommended, unless you're quite sure that
  2277. your files have unique names on their disks.)
  2278.  
  2279. EnterAct can handle the following changes to file and folders
  2280. without requiring you to make a new project:
  2281.     • renaming a folder
  2282.     • moving a folder around within one disk
  2283.     • moving a file to a different folder, provided the file
  2284.     name is unique on the disk, if you activate the "Relocate
  2285.     files automatically" option (see just above, not recommended
  2286.     for casual use)
  2287.  
  2288. As mentioned, EnterAct cannot track files if you move them
  2289. to a different disk, unless the two disks involved have the
  2290. same name. 
  2291.  
  2292. Tip: if you often restore your project files from another disk,
  2293. try using a smart copy utility such as CopyDoubler(tm) or equivalent:
  2294. this will preserve all folders involved, and EnterAct won't lose
  2295. track of any files due to two or more files having the same name.
  2296. Second-best for this case, make aliases for all the source folders
  2297. involved in your project, and place the aliases in your EnterAct
  2298. folder. Then you can build a new project quickly after restoring
  2299. your files, by dragging all the aliases at once onto your new
  2300. project window.
  2301.  
  2302. §    Creating a project
  2303. Select New Project from the EnterAct menu at any time. When you start
  2304. EnterAct by double–clicking on its icon, you’ll see the New Project
  2305. dialog if you cancel the Open Project dialog that appears first during
  2306. the startup. Since the the project will always be saved for you
  2307. automatically, there’s no such thing as an “Untitled” project: you’ll
  2308. have to give it a home on your disk before doing anything with it.
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.  
  2317.  
  2318.  
  2319.  
  2320.  
  2321.  
  2322. You can also use Save As to create a copy of an existing project. This
  2323. is a quicker approach if you want a basic set of files to be added to
  2324. a fresh project. To create a “starter” project, once you have a list
  2325. of files in mind:
  2326.     •    create a project that contains just the basic files, and give it
  2327.         a name that reflects its status as a “starter”
  2328.     •    bring the dictionary up to date, so this only has to be done once
  2329.         for the basic files
  2330.     •    set the font, size, and screen placement of the project window.
  2331.  
  2332. Thereafter, to use a “starter” project as the basis of a new project:
  2333.     •    open the starter project
  2334.     •    immediately use Save As, and give it an appropriate name
  2335.     •    proceed as with a new project, adding files and building the
  2336.         dictionary.
  2337.  
  2338. Candidates for inclusion in a “starter” project include toolbox headers
  2339. (omitting the ones you don’t need reduces memory needs) and the on-disk
  2340. manuals supplied with EnterAct. If you’re an object-oriented sort, then
  2341. many of the files in your class library of choice will qualify
  2342. as well.
  2343.  
  2344. §    Selecting your <system> folder
  2345. When you create a new project, a second dialog will appear asking you to
  2346. select the folder to designate as the <system> folder: this is the
  2347. folder where the "Add Mac Headers" command will search for your
  2348. Mac headers ("Quickdraw.h and friends), and it is also the folder used
  2349. to distinguish between All ".h" and All <.h> (or .c) in the Find dialog
  2350. when you are selecting files to search.
  2351.  
  2352. If you cancel the "Select <system> Folder" dialog when creating
  2353. a project, the folder that contains EnterAct itself will be used
  2354. by default. Rather than move EnterAct to your compiler's folder,
  2355. life is simpler if you make an alias for the folder that holds your
  2356. choice of toolbox headers, and put it in the folder where you will
  2357. keep your EnterAct project (personally, I keep them all in my
  2358. EnterAct Stuff folder). Then when you're asked to select a
  2359. <system> folder, select the alias you made. You can use a folder
  2360. that contains the toolbox headers, but things are easiest if the
  2361. folder you use does not contain two different versions of the
  2362. toolbox headers or some other important set of headers.
  2363.  
  2364. You can change the designated <system> folder for a project at
  2365. any time by using the "Select <system> Folder...." command under
  2366. the EnterAct menu.
  2367.  
  2368. §    Three panes—.c, .h, plain text
  2369. Any files you add to your project whose names end in .c, .C etc
  2370. (source files) will be placed in the left pane. Header files
  2371. (ending in .h, .H etc) will go in the middle pane, and any other
  2372. TEXT files that you add will end up in the right pane. PICT’s
  2373. will also be placed in the right pane.
  2374.  
  2375. Here's a complete list of file extensions that are recognised by
  2376. EnterAct:
  2377. ____
  2378. c C h H cp cpp c++ asm CP CPP C++ ASM hp hpp HP HPP Cpp
  2379. java Java jav Jav JAVA JAV
  2380. ____
  2381. Of these, the ones starting with h or H are added to the middle pane,
  2382. and all others are added to the leftmost pane.
  2383.  
  2384. If you have special file extensions after a period, eg “.Proto”, that
  2385. you would like to have treated as source or header files, see the
  2386. “Custom file extensions” section a few pages on.
  2387.  
  2388. The dictionary-builder does not look at files in the right pane, which
  2389. is reserved for documentation. However, it will extract definitions
  2390. and prototypes from all files in the left and middle panes. If you don't
  2391. want a file in the left or middle pane to be parsed by the dictionary
  2392. builder, hold down the <command> key and click on the file name
  2393. in the project window to place a dash '-' beside it.
  2394.  
  2395. In each pane, the files are sorted alphabetically by name. Since
  2396. EnterAct is not a compiler, there’s no need to set up code segments.
  2397.  
  2398. If you add more than one file with the same name, truncated full path
  2399. names will be shown to the right of the names so that you can tell
  2400. which one is which (usually).
  2401.  
  2402. §    Adding Java files
  2403. Nearly everything for Java files is the same as for C++ files.
  2404. For best results, find the source folder for the standard java libraries
  2405. somewhere (eg CW9) and drag it onto your project.
  2406.  
  2407. §    Add Files—the one-at-a-time way
  2408. The Add Files command will let you repeatedly add files (one at a time)
  2409. to your project, until you cancel the dialog. The appropriate pane for
  2410. each file will be chosen for you. The type of the file you add can be
  2411. TEXT or PICT.
  2412.  
  2413. §    Adding files from a list
  2414. The Add Files from List… command appears in place of
  2415. the Add Files command when you hold down the <Shift> or <Option> key.
  2416. A standard Open dialog will appear, in which you should select a text
  2417. file that contains a list of full path names of files to be added to your
  2418. project, one name per line. Within EnterAct, a list of full path names
  2419. can be generated by selecting the desired files in your project for
  2420. multi-file operations (hold down the <Option> key and click on the files
  2421. in your project window), and then running the hAWK program
  2422. $EchoFullPathNames. See the “Search” chapter for multi-file
  2423. selections, and Appendix 2 for hAWK.
  2424.  
  2425. Recommended, for VERY important projects take a minute to produce
  2426. a list of all files in your project:
  2427.     •    with the project open, call up Find and click the "All" button
  2428.         to place bullets beside all files (just make sure all disks for
  2429.         the files are mounted)
  2430.     • select "hAWK", pick the $EchoFullPathNames program from the
  2431.         top popup menu, and click "Run"
  2432.     •    Save the resulting document as "MyProj Files" or equivalent.
  2433.  
  2434. Later, if you need to recreate the project, you can do so quickly
  2435. with the Add Files from List… command. However, these days
  2436. it's simpler to create aliases for all the source folders involved
  2437. in your project, so recreating the project just involves dragging
  2438. the folder aliases onto a new project window.
  2439.  
  2440.  
  2441. §    Add All In Folder—the fast way
  2442. To add all files in a folder to your project:
  2443.     •    select Add All In Folder
  2444.     •    select a folder that contains files to be added
  2445.     •    click on the button with the folder's name at bottom
  2446.     •    do another folder, or Cancel
  2447.  
  2448. When you click the bottom button, all TEXT files in
  2449. the folder will be added to your project. Files in subfolders will not
  2450. be added. This command will also repeat until you click the Cancel
  2451. button. As with Add Files, there’s no need to select a project pane
  2452. beforehand.
  2453.  
  2454.  
  2455.  
  2456.  
  2457.  
  2458.  
  2459.  
  2460.  
  2461.  
  2462.  
  2463.  
  2464.  
  2465.  
  2466.  
  2467.  
  2468.  
  2469.  
  2470.  
  2471.  
  2472.  
  2473.  
  2474.  
  2475.  
  2476.  
  2477.  
  2478.  
  2479.  
  2480.  
  2481.  
  2482.  
  2483. (Clicking on the "CEDARL_Source" button would add all files in that
  2484. folder to the project, and also all files in subfolders if the <Shift>
  2485. key was down while picking the "Add Files" menu item.)
  2486.  
  2487. To add all files in all subfolders to your project as well, hold down
  2488. the <Shift> or <Option> key while picking  Add All In Subfolders (the key
  2489. command won’t work with the <Option> key, just the <Shift> key). Then
  2490. select a folder and click on the bottom button with its name.
  2491. .Note that <Command><period> will interrupt this all-inclusive
  2492. version of Add All In Folder, in case you start in the wrong place.
  2493. This <shift> version of Add All is the exact equivalent of dragging
  2494. a folder or folder alias onto your project window.
  2495.  
  2496. You can also select and add individual files with the Add All
  2497. command, but note this will have exactly the same effect
  2498. as selecting the folder that contains the file, adding all
  2499. files in the folder (and optionally subfolders).
  2500.  
  2501. §    Add Mac Headers
  2502. The Add Mac Headers command will search the folder that contains
  2503. EnterAct and all sub–folders for the file “Quickdraw.h”. Wherever it
  2504. is found, all files in that folder will be added. If not found, you will
  2505. see a message from EnterAct mentioning that “Quickdraw.h” wasn’t found
  2506. anywhere. You can add these headers yourself with the Add All
  2507. In Folder command.
  2508.  
  2509. If you hold down the <Shift> or <Option> key while selecting this
  2510. command, then in addition Add THINK Headers will also be done (see just
  2511. below).
  2512.  
  2513. If EnterAct complains that it can't find your toolbox files (or just as
  2514. bad, that if found more than one version), you can add the toolbox files
  2515. yourself--the easiest way is to make an alias for the toolbox headers
  2516. you want, and place it in your EnterAct folder. Then you can add the
  2517. headers by dragging the alias onto your project window.
  2518.  
  2519. §    Add THINK Headers
  2520. This command will add all files in the folder containing “THINK.h” to
  2521. your project. These include “asm.h”, “pascal.h”, “SANE.h” etc.
  2522. If you're using CodeWarrior or MPW, this command doesn't do much.
  2523.  
  2524.  
  2525. §    Add Standard C Headers
  2526. This command will add all files in the folder containing “stdio.h” to
  2527. your project.
  2528.  
  2529.  
  2530. §    The active pane
  2531. When you click in one of the three file lists it becomes the active
  2532. pane, as indicated by highlighting of the file name you click on, and
  2533. activation of the scroll bars for that pane. You can also switch
  2534. between panes by using the left and right arrow keys.
  2535.  
  2536. Some project-related commands such as Update Dictionary and Find In
  2537. Next File are independent of the active pane, while others act within
  2538. a particular pane. Here’s a list of commands and features which apply
  2539. to the active pane:
  2540.     •    the active pane is relevant only when the project window is in
  2541.         front, in which case one of the file names in the active pane will be
  2542.         highlighted, and the scroll bars will be active
  2543.     •    to scroll the currently-selected file in the active pane into view,
  2544.         press <Enter>
  2545.     •    as you drag about in the active pane the currently-selected file
  2546.         will change to keep up with your mouse, with full autoscrolling
  2547.     •    to move up and down the list of files in the active pane, use the
  2548.         up and down arrows. <Option><up arrow> selects the first file in the
  2549.         pane, and <Option><down arrow> selects the last file
  2550.     •    to change panes, click in the pane you want or use the <left arrow>
  2551.         and <right arrow> keys
  2552.     •    type part of a file name to advance to a particular file in the
  2553.         active pane, eg type "mou" to advance to either "Mouse.h" or
  2554.         "MAIN_Mouse.h" -- a match on the first part of the name is tried
  2555.         first, and if that fails then a match anywhere within the name counts
  2556.     •    Copy will copy the currently-selected file name in the active pane
  2557.     •    double-clicking on a file name opens the file, and the
  2558.         currently-selected file in the active pane can be opened with the Go
  2559.         to command
  2560.     •    the active pane is searchable with the Find and Find Again commands
  2561.         when the project window is in front, or just behind the Find dialog.
  2562.         Note that when the Find dialog is immediately in front of the project
  2563.         window the “Find” button will search the list of file names in the
  2564.         active pane, whereas the “Find In Next File” button will search through
  2565.         the contents of those files marked with bullets (•). Searching through
  2566.         the active pane for part of a file name or a file extension is handy
  2567.         when you have a great many files in a pane
  2568.     •    Remove File removes the currently-selected file in the active pane
  2569.         from the project, deleting both the file name and the associated
  2570.         dictionary entries.
  2571.  
  2572. §    Remove File
  2573. To remove one file from a project, bring the project window to the
  2574. front, select the file by clicking on it, and then select Remove File.
  2575. If you have built a dictionary for the project, the dictionary will
  2576. be automatically updated for you.
  2577.  
  2578.  
  2579. §    Remove •'d Files
  2580. The “•” refers to files in the project window that have been marked
  2581. for multi–file operations (a bullet • appears to the left of the file
  2582. name). Before issuing this command, first mark the files that you wish
  2583. to remove with bullets (<Option>drag over the files in the project
  2584. window). You can also mark all files of a particular type by using the
  2585. buttons in the Find dialog.
  2586.  
  2587. Any dictionary entries associated with the file will also be deleted.
  2588. See the next chapter for a description of your project dictionary.
  2589.  
  2590. By the way, this is the only command in EnterAct that will pay
  2591. attention to bullets beside PICT file names. All other commands which
  2592. deal will your list of bulleted files (such as Find In Next File, or
  2593. passing the list as input to a hAWK program) will quietly ignore the
  2594. PICT files, since all other multi-file commands deal only with text
  2595. files.
  2596.  
  2597.  
  2598. §    Custom file extensions
  2599. The File Extensions command under the EnterAct menu allows you
  2600. to specify additional file extensions beyond the standard .c, .C, .h,
  2601. .H etc. Type in your own extensions (up to 48 extensions, each up to
  2602. 5 characters), and pick which pane the file should be added to. For
  2603. example to have “.Proto” files added to the middle pane, type in
  2604. “Proto” (don't type the period) in one of the extension fields and
  2605. click the corresponding “Mid pane” button. Extensions are
  2606. case-sensitive, so “PROTO” is not the same as “Proto”. If you have
  2607. multiple versions of the same extension, you should enter them
  2608. separately.
  2609.  
  2610. If a project is open when you pick File Extensions the extensions you
  2611. enter will apply to that project only, as indicated by the “This
  2612. project” button. If no project is open at the time, the extensions will
  2613. be used for any new project you create (the bottom-left button will
  2614. read “New projects” in this case).
  2615.  
  2616. Please note any file that is added to the left or middle panes will
  2617. be parsed, and terms contained will be built into your dictionary, as
  2618. explained in the next chapter on dictionaries. This means the files
  2619. must be in C/C++/Java (or at least “C--”), otherwise the dictionary builder
  2620. will complain. To get around this for an individual file, <command>click
  2621. on the file name in the project window to place a dash '-' beside it.
  2622.  
  2623. One use for this that you might like to explore later is creating your
  2624. own “.Note” files. The “.Note” extension will remind you of their
  2625. contents, namely hyperlinked notes on any subject that can be called
  2626. up with a click and press of the <Enter> key. This is described at
  2627. length in the “Lookup” chapter, which you’ll get to eventually if you
  2628. just keep reading along.
  2629.  
  2630. Here’s what the File Extensions dialog looks like:
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651. ("This project" reads "New projects" if you don't have a project open)
  2652.  
  2653. §    Distinguishing ".h" from <.h>
  2654. The All ".h" and All <.h> buttons in the Find dialog let you set up a
  2655. multi–file search for just one kind of header (ie system or your own),
  2656. and since bullets • are shown beside selected files selecting one or
  2657. the other kind will give you an on–screen way of telling which are
  2658. which. Similarly, the All ".c" and All <.c> buttons allow you to select
  2659. source files in either your project folder or your system folder
  2660. for multi-file operations such as searching. The "system" folder
  2661. is the one that contains EnterAct.
  2662.  
  2663. Note for this to work properly you must select the appropriate
  2664. <System> folder either when making the project or at any time
  2665. thereafter using the "Select <system> folder..." command.
  2666.  
  2667. Technically, the Find buttons mentioned above bullet files in the left
  2668. or middle pane based soley on their disk location. In particular, any files
  2669. with custom file extensions such as “PROTO” or “Notes” will end up with
  2670. bullets if they they fall in the category selected (<.h> and <.c> for
  2671. the <system> folder, ".h" and ".c" for elsewhere).
  2672.  
  2673. §    Copy and search in the project window
  2674. When you have a file name selected in the project window, you can Copy
  2675. it and then Paste it into a text window. This helps sometimes with
  2676. documentation. 
  2677.  
  2678. With the project window in front, you can type as in a Finder window to
  2679. advance the selection in the current project pane to the first file name
  2680. that begins with the characters you typed. You can also type any unique
  2681. part of a file name to select it, for example if you have the source pane
  2682. selected and "NPXWE_DialogHandler.cp" is the only file name in the pane
  2683. that contains "Dial", then typing "dial" will select that file. Neat!
  2684.  
  2685. And, if you have an enormous project, the Find dialog will let you
  2686. search for part or all of a file name in a particular pane. Select the
  2687. pane in the project window that you wish to search, call up the Find
  2688. dialog, and then continue as though you were searching for something
  2689. in a text document.
  2690.  
  2691.  
  2692. §    Project memory needs
  2693. EnterAct will be keeping your entire project dictionary in memory, for
  2694. rapid access, and this does place a practical limit on the size of a
  2695. project. Roughly, the memory needed will amount to 500K for basic
  2696. operations plus 16% of the size of all source (left-pane) files plus
  2697. 120% of the size of all header (middle-pane) files, with “size” meaning
  2698. the size of a file’s data fork in bytes, rather than the disk space
  2699. used. Note that toolbox and other header files can take a large memory
  2700. bite, so if memory becomes tight your greatest savings can be realised
  2701. by removing header files that you don’t really need built into your
  2702. dictionary.
  2703.  
  2704. As a rule of thumb, give a small project about 2 Meg to work with,
  2705. and allow about 7 Meg for a larger one (say 1 Meg of source code with most
  2706. toolbox headers).
  2707.  
  2708. For more details, especially on toolbox headers and their memory needs,
  2709. please see the document “EnterAct memory needs”.
  2710.  
  2711.  
  2712. §    Multi-file selection
  2713. The general notion is to select one or more of the project files listed
  2714. in your project window, and then issue a command that acts on all
  2715. selected files. The classic use is for multi-file searching.
  2716.  
  2717. To create a multi-file selection for your current project:
  2718.     •    (Coarse tuning) in the Find dialog, click on the various buttons
  2719.         that select all files of a particular type
  2720.     •    (Fine tuning) hold down the <Option> key and click on or drag over
  2721.         file names in the project window. This acts as a “toggle”, selecting
  2722.         files if they were not selected and vice versa. The cursor will change
  2723.         to an “eye” when it’s over the project window with the <Option> key
  2724.         down.
  2725.  
  2726. Each file included in your multi-file selection will have a bullet (•)
  2727. to the left of its name in the project window.
  2728.  
  2729. Your multi-file selection can be used in the following ways:
  2730.     •    to carry out a multi-file search; enter the text to be found in the
  2731.         Find dialog, and click the “Find In Next File” button there, or use
  2732.         the equivalent command under the Search menu. For more on this, see
  2733.         the “Search” chapter.
  2734.     •    to remove files from your project; use the Remove •'d Files command
  2735.         described earlier in this chapter
  2736.     •    as input to a hAWK program; for example, to generate a list of full
  2737.         path names for all text files in your multi-file selection:
  2738.         •    select the hAWK command under the EnterAct menu
  2739.         •    use the “Program:" popup menu to select “$EchoFullPathNames”
  2740.         •    click the “Run” button, and wait a bit... the list of full
  2741.             path names will be shown to you in a fresh window.
  2742.     •    as input for one of the “Index" commands, as described in
  2743.         the “‘Index’ commands” chapter.
  2744.  
  2745. For more on hAWK see the “hAWK User’s Manual”.
  2746.  
  2747.  
  2748.  
  2749.  
  2750.  
  2751.  
  2752.  
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773.  
  2774. (Coarse-tune your multi-file selection with buttons in the Find dialog,
  2775. fine-tune it by holding down the <Option> key and dragging over files
  2776. in the project window)
  2777.  
  2778.  
  2779. §    Project context restoration
  2780. When you close a project, or quit with a project open, the project will
  2781. keep a list of all project documents that are open at the time. That’s
  2782. your “context”. The next time you open the project, all of those
  2783. project documents will also be reopened, and placed and scrolled much
  2784. as you left them, and the Browser window will also be brought back if
  2785. you left it open. This is all automatic, so in the rare event that you
  2786. don’t want your context restored, do a Close All before closing the
  2787. project or quitting.
  2788.  
  2789. Some details: your windows will be put back exactly where you left
  2790. them; file errors are suppressed during context restoration, so if a
  2791. document seems to be missing try double–clicking on it in the project
  2792. window; text documents will be restored with your insertion point or
  2793. selection range scrolled into view, to avoid confusion; however, if
  2794. a document is already open, only its window order will be restored;
  2795. and if a document has been edited (anywhere) while the project was
  2796. closed, it won’t be scrolled. Lookup windows and  documents that
  2797. haven’t been added to your project (including “Untitled” windows) are
  2798. not restored. However, AutoLook will be restored.
  2799.  
  2800. If you’re about to switch from one project to another, and want the
  2801. project being closed to remember and restore the open documents, close
  2802. the project before closing any of the documents that you want
  2803. remembered—then open the other project.
  2804.  
  2805. §    Switching to other projects
  2806. <Option> or <Command> click in the title bar of a project window to
  2807. view a popup list of other projects that you have had open.
  2808. When you pick one  from the list, your current project will close and
  2809. the one you picked will open. If you use the <Option> key, you will be
  2810. asked to save any documents that need saving, and all text windows
  2811. will be closed. If you use the <Command> key, all your text windows
  2812. will be left open. Using the <Option> key to close all windows
  2813. between switches is the better approach if all of the files you
  2814. are dealing with are in your projects, since it keeps your screen
  2815. from becoming buried under a sea of windows.
  2816.  
  2817. §    Tips
  2818. When you double–click on a file name in the project window to open a
  2819. file, the project window will at the same time move to the back behind
  2820. all other windows. If the project window becomes hidden, you can bring
  2821. it to the front again by selecting it from the Windows menu or using
  2822. the menu key equivalent <Command><zero> which is always for the project
  2823. window. Since the project window goes all the way front or back with
  2824. a key–stroke or double–click, you can if you wish make the project
  2825. window relatively large and treat it as a sort of backdrop mini–Finder
  2826.  
  2827. If you begin the names of your own header files with a common character
  2828. or group of characters, they will end up grouped together in the middle
  2829. pane of your project window, and similarly for the other panes.
  2830. Remember you don't have to type the prefix to select a file
  2831. in the active pane, you just need to type some distinctive part of
  2832. the name.
  2833.  
  2834. If you're short on memory:
  2835. To save on memory needed for dictionaries, create one or more “generic”
  2836. projects which include header files that are often needed—and exclude
  2837. headers than aren’t often needed. Select Update Dictionary before
  2838. putting your generic project away. When you want to create a new
  2839. project, open the appropriate generic one and use Save As to give it
  2840. a new name. This way you won’t have to weed out unneeded headers to
  2841. minimize memory needs, and your dictionary will already be up to date
  2842. for the basic headers.
  2843.  
  2844. -    -    -    -    -    -    -    -    -    -    -    -
  2845. Dictionaries
  2846. -    -    -    -    -    -    -    -    -    -    -    -
  2847. §    Introduction
  2848. Once built, a project’s dictionary will contain entries for virtually
  2849. every C/C++/Java term in every source (left pane) or header (middle pane)
  2850. project file that is not restricted in scope to the body of a function.
  2851. For functions and methods the dictionary entry will
  2852. be the prototype or equivalent, and for all other terms the entry will
  2853. consist of the entire statement in your source code in which the term
  2854. was mentioned or defined. Regular use of Update Dictionary will keep
  2855. your dictionary current as you develop your source code.
  2856.  
  2857. As explained in the next chapter, the main point of having a dictionary
  2858. is to give you instant displays of those definitions and prototypes.
  2859. The AutoLook window shows them automatically as you edit, and more
  2860. detailed and permanent displays can be generated by double-clicking
  2861. on a name and pressing the <Enter> key. You can also jump to the
  2862. definition of any dictionary entry, as explained in the “Seeing where
  2863. a term is defined” chapter. The project dictionary forms the basis for
  2864. the display in the Browser window. And there’s a hAWK built-in function
  2865. that lets you determine the type of a C term within the context of your
  2866. current project (see the hAWK program “$Whazzat”, which
  2867. translates C declarations into English).
  2868.  
  2869. The AutoLook window can also display definitions for local variables.
  2870. For this to work, in addition to having a dictionary you should be
  2871. working inside a function in a source file.
  2872.  
  2873.  
  2874. §    What’s in a dictionary
  2875. After you’ve built your dictionary with the Update Dictionary command
  2876. (see the next section), it will contain entries for everything of
  2877. interest in your current project’s source (left pane) and header
  2878. (middle pane) files that you would want to use in more than one 
  2879. function. Specifically there will be an entry for every:
  2880.     •    function—all types including static, in–line, method
  2881.     •    struct, union, enum, class
  2882.     •    enum constant
  2883.     •    #define—constant and macro
  2884.     •    typedef
  2885.     •    variable—all types including static, low–memory
  2886.  
  2887. —provided only that the term is defined or mentioned outside of a
  2888. function.
  2889.  
  2890. Note that members of classes, structs and unions are included, as
  2891. are prototypes or definitions of methods within class definitions.
  2892. Local variables are not included in your dictionary, but the AutoLook
  2893. window can look at your function to find the variable's defining
  2894. type name (which should be a keyword or something in your
  2895. dictionary).
  2896.  
  2897. Dictionary entries for functions and methods will contain the prototype
  2898. or equivalent. For all other kinds of terms, the dictionary entry will
  2899. consist of the complete C statement in which the term occurs in your
  2900. source code.
  2901.  
  2902. All variants of a particular term will be included as separate entries
  2903. in the dictionary. For example, if your source code contains the
  2904. definition of a function and also a prototype for the function, then
  2905. two entries for the function will be made in the dictionary. 
  2906.  
  2907. When EnterAct runs into conditional inclusion such as
  2908.  “#ifdef SomeThing ...  #else ...#endif”, it picks up definitions
  2909.  in the first part and ignores the "else" or "elif" sections. The
  2910.  parser also ignores anything inside the standard
  2911.  “#if 0 ... #endif” construction.
  2912.  
  2913. §    Building your dictionary
  2914. To exclude a file from being built into your dictionary, hold down
  2915. the <Command> key and click on the file's name in the project
  2916. window. The cursor will change to an 'X' while you do this, and
  2917. a dash '-' will appear to the left of the file name to show that it
  2918. is excluded.
  2919.  
  2920. If you are adding files from a list (via <Shift>Add Files...), you can
  2921. exclude a file from being built into the dictionary by placing an
  2922. exclamation mark at the beginning of its path name, eg to exclude
  2923. the file
  2924. ____
  2925. HardDisk:Folder:src:George.cp
  2926. ____
  2927. add a '!' so it reads
  2928. ____
  2929. !HardDisk:Folder:src:George.cp
  2930. ____
  2931.  
  2932. After you’ve added all your files to your project, select Update
  2933. Dictionary from the EnterAct menu. If the dictionary–builder stumbles
  2934. over a statement that’s too mangled to parse, you’ll see a message
  2935. explaining in general what the problem is. You’ll also be shown the
  2936. file in question, with the cursor placed at the position where the
  2937. error was detected. Generally, most problems reported will be
  2938. well–localised and fairly easy to fix—typical problems are lack of
  2939. balance for critical delimiters, and missing or very badly spelled
  2940. keywords. If you don’t see what the problem is, consult the “Dictionary
  2941. build problems” section of the “If there’s a problem” chapter.
  2942.  
  2943. EnterAct’s dictionary–builder will properly interpret a great many
  2944. first–draft errors, including missing semi–colons, lack of balance in
  2945. some delimiters (these vary according to context), slightly misspelled
  2946. keywords, and some others. Your source code should mostly make
  2947. sense, but it doesn't have to be perfect.
  2948.  
  2949. In a contrary sort of way, using EnterAct will almost certainly
  2950. reduce your first–draft errors. This is simply because you now have
  2951. instant access to all spellings and types of struct members, all
  2952. function and method calls, etc, so a major source of errors
  2953. is now gone.
  2954.  
  2955. §    Keeping it up to date
  2956. EnterAct does not update your dictionary automatically. Generally, you
  2957. should select Update Dictionary whenever you change or add something
  2958. that you’d like to have in the dictionary. Changes that take place
  2959. entirely within the body of a function will not affect what’s in your
  2960. dictionary. Any changes outside of a function body, including adding
  2961. a new function, adding or changing an enum constant or struct or class
  2962. member etc will be changes that you’d normally like to have reflected
  2963. in your dictionary.
  2964.  
  2965. Update Dictionary checks each file's modification time against the
  2966. time it was last updated by Enteract, so there is no need to "make"
  2967. an EnterAct project as a separate step.
  2968.  
  2969. Update For Front File Only will rebuild only that part of your
  2970. dictionary that is determined by the front text window. Unlike the
  2971. other two update commands, this is a “manual override”, and rebuilds
  2972. the dictionary for the front file whether or not it needs rebuilding.
  2973. Normally you won’t need to use this command, because a full update with
  2974. Update Dictionary for all changed files is almost always very quick.
  2975.  
  2976. There are two special cases in which you’ll probably want to rebuild
  2977. your entire dictionary:
  2978.     •     enabling the “Detect nested comment start” option (see “Option”
  2979.          chapter), after having done a dictionary update with this option
  2980.          disabled
  2981.     •    adding one or more new “macro’s to skip” (see the section on
  2982.         “All-or-nothing macro’s” in the “Source code restrictions chapter)
  2983.  
  2984. To completely rebuild your dictionary, hold down all three of the
  2985. <Shift>, <Option>, and <Command> keys while using the mouse to select
  2986. Update Dictionary (note the key equivalent doesn’t work with this
  2987. variation).
  2988.  
  2989. A small point, but worth noting: if you make a significant change to
  2990. a header file that’s #included in a great many source files, don’t be
  2991. reluctant to bring your dictionary up to date. EnterAct’s dictionary
  2992. builder only needs to scan changed files once, no matter how they are
  2993. #included. The dictionary update will take just a few seconds at most
  2994. (the tedious part, saving the new dictionary to disk, is done
  2995. transparently while you continue to work). For example, on a
  2996. relatively slow machine with a 68040 running at 25 Mhz, a typical
  2997. incremental update will take 5-10 seconds.
  2998.  
  2999.  
  3000. §    How long will it take?
  3001. Typically an update zips along at two to three files per second on a slow
  3002. 68040 machine once it gets going. There is a bit of overhead at the end
  3003. of an update while the browser is rebuilt, roughly three seconds.
  3004. Project dictionary saving is done transparently in the
  3005. background unless you close the project or Quit or issue some other
  3006. command that requires a fully-saved project. You can go back to editing,
  3007. looking things up, searching etc right after the last file is parsed.
  3008.  
  3009. On a Quadra 840 or faster, update speed is simply astonishing.
  3010.  
  3011. As mentioned above, all changed files including ".h" files are scanned
  3012. only once during an update.
  3013.  
  3014. Your regular dictionary update will probably involve no more than
  3015. four files, and for this your total time "lost" will typically be under
  3016. under six seconds. On a Quadra 840, blink and you miss it.
  3017.  
  3018. If you need to interrupt the dictionary update, press
  3019. <Command><period>. This also interrupts multi–file searches, and
  3020. printing, and hAWK programs, by the way. You can finish the job off
  3021. properly later by reselecting your original dictionary update command.
  3022.  
  3023.  
  3024. §    Show Dictionary
  3025. (This command is not especially useful, since in practice most
  3026. dictionaries are very big, and you'll run out of memory.)
  3027.  
  3028. This command produces a “raw” dump of all the text in your dictionary,
  3029. consisting of all the definitions or declarations that the
  3030. dictionary–builder extracted from your code. At the top will be a
  3031. comment listing the number of definitions of each type. The entries
  3032. in the dictionary dump will be grouped together by file after a comment
  3033. giving the file name, and within each file will appear in the same
  3034. order as they occurred in the original file. You can use Save As if
  3035. you wish to save your raw dictionary.
  3036.  
  3037.  
  3038.  
  3039.  
  3040.  
  3041.  
  3042.  
  3043.  
  3044.  
  3045.  
  3046.  
  3047.  
  3048.  
  3049.  
  3050.  
  3051.  
  3052.  
  3053.  
  3054.  
  3055.  
  3056.  
  3057.  
  3058.  
  3059.  
  3060.  
  3061.  
  3062.  
  3063. -    -    -    -    -    -    -    -    -    -    -    -
  3064. Lookup
  3065. -    -    -    -    -    -    -    -    -    -    -    -
  3066. You can expect that better than 90% of your routine information needs
  3067. will be satisfied by the AutoLook window. For remaining needs, regular
  3068. lookup (press <Enter>) pulls up definitions of terms to separate
  3069. windows, and also works when your spelling is off but “distinctively
  3070. close”. And reverse lookup (<Shift><Enter>) shows definitions of
  3071. structs, unions, and typedefs that contain a particular member, again
  3072. in a separate window.
  3073.  
  3074. Please note that definitions of local variables appear only in the
  3075. AutoLook window, and if you want them in a separate window
  3076. you'll have to do the Copy-New-Paste thing.
  3077.  
  3078. Lookup and many other features (such as jumping to a definition) are
  3079. fully functional with first-draft code. All lookup windows, including
  3080. AutoLook, are fully editable, but can't be saved.
  3081.  
  3082. EnterAct's lookup features can be used to help out less "language
  3083. aware" editors. If you feel more comfortable working that way,
  3084. see the last section in this chapter (but read just below about
  3085. <Enter> for lookup, <Shift><Enter> for member lookup, and the
  3086. all-important AutoLook window first, please).
  3087.  
  3088. §    AutoLook
  3089. The AutoLook command calls up an automatic lookup window which
  3090. updates by itself to show dictionary entries as you type, edit, or
  3091. click around with the mouse. It will instantly retrieve and display a
  3092. definition for the words that lie just before your insertion point, or
  3093. within your current selection (which can be part of a larger
  3094. word). And it’s just as editable as a regular text window (Cut Copy
  3095. Replace etc), though you can’t save changes to it.
  3096.  
  3097. AutoLook is context-aware: it can determine if a name is a local
  3098. variable, and when dealing with members or methods it tries its
  3099. best to look in the appropriate inheritance chain. If you're in a
  3100. plain document rather than a source file, AutoLook still works,
  3101. but with less accuracy.
  3102.  
  3103. AutoLook can be used to look up a simple name, such as
  3104. "noErr": just click after the name and its definition will appear
  3105. instantly in the AutoLook window (for this one, you'd need to
  3106. add Mac Headers, or at least Types.h, to your project).
  3107.  
  3108. And AutoLook can be used to resolve a complicated "reference
  3109. chain". Taking a C example such as
  3110. ____
  3111.     mySFRPtr->sfFile.parID
  3112. ____
  3113. if you clicked after "parID" you would see in AutoLook that it
  3114. is a long member in an FSSpec; and if you clicked after "sfFile",
  3115. AutoLook would show that it is the FSSpec member in a
  3116. StandardFileReply struct. And if you clicked after "mySFRPtr"
  3117. in the function where I took this example, you would see that
  3118. it is a local variable of type "StandardFileReply    *", together
  3119. with the definition of a StandardFileReply. Actually, AutoLook
  3120. is much easier to use than to describe--try it! Just click after
  3121. any name of interest, anywhere.
  3122.  
  3123. Summary:
  3124.     • AutoLook shows definitions instantly for terms to the left
  3125. of your insertion point, or within your selection
  3126.     • If you're working inside a function in a source file, then the
  3127. AutoLook window will also display definitions for local variables.
  3128.     • If you're working within a method, lookup shown for members
  3129. and methods will be more accurate than if you're in a plain
  3130. document
  3131.     • Your spelling must be exact for most terms - if you don't see what
  3132. you expected, press the <Enter> key to look up a top-level term,
  3133. or <Shift><Enter> to look up a struct or class member (see below)
  3134.     • AutoLook shows supporting definitions for a name when
  3135. appropriate (eg if a name is a variable of type FSSpec, you'll
  3136. also be shown the definition of an FSSpec).
  3137.  
  3138. For another example, if there are entries in your current dictionary for
  3139. “Window”, “WindowData”, and “WindowDataPtr”, then all three entries
  3140. will appear in succesion in the AutoLook window as you type
  3141. “WindowDataPtr”. Selecting “Ptr” will call up the definition of “Ptr”,
  3142. whereas selecting (or clicking after) “contained within the
  3143. WindowDataPtr” will call up the definition of “WindowDataPtr”.
  3144. In both of these latter cases, the full definition of the "WindowData"
  3145. struct will appear in the AutoLook window.
  3146.  
  3147. If the definition of the word involves obvious typedefs,
  3148. #defines, or structs or unions, definitions for them will be appended to the
  3149. AutoLook display—for example, if you double-click on a global variable
  3150. gEvtDetails you won’t see just
  3151.     "EventDetails        gEvtDetails ;"
  3152. you’ll also see what an EventDetails thing is defined to be.
  3153.  
  3154.  
  3155.  
  3156.  
  3157.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162.  
  3163.  
  3164.  
  3165.  
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.  
  3173. (as of v3.5, we skip the "middlemen", for example the typedef for
  3174. "EventDetails" is not shown in AutoLook, since it adds little
  3175. to comprehension)
  3176.  
  3177. As mentioned, the AutoLook window produces fast accurate lookup for
  3178. data members, when you're working in a method. Click after or
  3179. double-click on the data member's name, as usual, and the
  3180. declaration for the data member will appear in the AutoLook
  3181. window, followed by any supporting definitions -- eg "Thing
  3182. *dataMember;" would be followed by the definition of "Thing".
  3183.  
  3184.  
  3185.  
  3186.  
  3187.  
  3188.  
  3189.  
  3190.  
  3191.  
  3192.  
  3193.  
  3194.  
  3195.  
  3196.  
  3197.  
  3198.  
  3199.  
  3200.  
  3201.  
  3202.  
  3203.  
  3204.  
  3205.  
  3206.  
  3207.  
  3208.  
  3209.  
  3210.  
  3211. The AutoLook window will tell you which class
  3212. definition the declaration was found in, either the class that owns
  3213. the method you're working in, or any of the classes it inherits
  3214. from. This "data member" lookup for AutoLook is case-sensitive,
  3215. and the beginning of the name you're looking up must match the
  3216. beginning of the data member's name exactly, to speed things up
  3217. and cut down on spurious matches. If you're not working in a method
  3218. or your spelling is slightly off, AutoLook will still often take a stab
  3219. at showing you a definition, but it may just be guessing.
  3220.  
  3221. EnterAct's parser doesn't resolve overloaded method names, so you
  3222. may see more definitions than you want when you look up such a
  3223. name.
  3224.  
  3225. §    Regular lookup (press <Enter>)
  3226. The AutoLook window changes as you work, doesn't always show all
  3227. variants, and works only with correct spelling. To produce a more
  3228. permanent display of a definition, or a display listing all variant
  3229. definitions of a name, or to pull up a definition for a name when
  3230. you’ve forgotten the correct spelling, press the <Enter> key. You can
  3231. either double-click on the name or type it in or click just to the
  3232. right of it, then press <Enter>.  As a special case, note that local
  3233. variables are not in your dictonary and so definitions for them will
  3234. show only in the AutoLook window. This may change in a future version.
  3235. Hey, the top of the function isn't that far away. To toggle between
  3236. your working position and the top of a function, use the "Go Back"
  3237. command, or mark both locations using the Locations menu.
  3238. To produce a more permanent display of a local definition,
  3239. you'll have to manually copy it to another window.
  3240.  
  3241. Lookup windows also provide a context for jumping to one of
  3242. several definitions for a term, as described in chapter 11,
  3243. "Seeing where a term is defined." In brief, to jump to a specific
  3244. definition for a term:
  3245.     • press <Enter> to look the term up to a separate lookup window
  3246.     • pick the one you want; either <Option>click in the lookup
  3247.         window's title bar, or keep pressing <Enter>
  3248.     • <Option>double-click on the term you want (for a two-part name
  3249.         such as "Class::method", do the double-click on one name and then
  3250.         drag to the other name before releasing the mouse).
  3251.  
  3252. Back to pushing the <Enter> key: definitions that match or come
  3253. closest to the term you’re looking up will be displayed in a new
  3254. “lookup” window. It looks like a regular text window, but the title
  3255. of the window will be the term you’re looking up, preceded by
  3256. two bullets (••). Text in the window can be edited (Cut Copy
  3257. Replace etc), but changes are temporary.
  3258.  
  3259. In the display box along the bottom of the window you will see the name
  3260. of the file from which the definition was taken, followed by a number
  3261. such as “1/4” indicating that the definition is the first of four
  3262. available in the window. This number can range from “1/1” to “1/60”.
  3263. In all lookup windows, to view other definitions:
  3264.  
  3265.     •    hold down the <Option> key (or the <Command> key)
  3266.     •    click-and-drag in the lookup window’s title bar
  3267.     •    select from the resulting popup menu describing the definitions.
  3268.  
  3269. Or, press the <Enter> key to view the next available definition,
  3270. <Option><Enter> to view the previous one.
  3271.  
  3272.  
  3273.  
  3274.  
  3275.  
  3276.  
  3277.  
  3278.  
  3279.  
  3280.  
  3281.  
  3282.  
  3283.  
  3284.  
  3285.  
  3286.  
  3287.  
  3288. (Double-clicking on “KeyDetails” and pressing the <Enter> key produced
  3289. the “••KeyDetails” lookup window. The cursor is caught in the act of
  3290. an <Option>click in the title bar of the lookup window.)
  3291.  
  3292. When your spelling is exact, the lookup window will contain all variant
  3293. definitions of the term. For example, there will often be a defining
  3294. instance and prototype for a function, and quite often a struct and
  3295. a typedef with the same name will exist.
  3296.  
  3297. Unlike AutoLook, regular lookup works even if your spelling is off.
  3298. There are no arcane rules to memorize concerning what to type if you
  3299. can’t remember the exact spelling of a term: just type your best guess.
  3300. Do use the correct case though, because regular lookup is
  3301. case-sensitive, the same as C itself. OK, regular lookup will compensate
  3302. instantly for a single case error, but otherwise it will start looking
  3303. for best matches through your whole dictionary, and this takes a
  3304. moment.
  3305.  
  3306. If your spelling was off, the lookup window will hold definitions for
  3307. terms that best match what you typed, in order according to how well
  3308. they match. In this case, you control how many matches are available
  3309. in the lookup window (see “Number of entries per lookup” later in this
  3310. chapter, it's a field in the Options dialog).
  3311.  
  3312. When your spelling is incorrect, EnterAct first checks for common
  3313. errors such as full spelling when an abbreviation is needed, use of
  3314. a common synonym, permutations, and single case errors. Up to this
  3315. point, regular lookup is instant. If no match is yet found, EnterAct
  3316. then checks all entries in your dictionary and locates the ones that
  3317. best match what you typed, based on runs of matching characters. This
  3318. phase may take several seconds, but is still much faster and easier
  3319. than searching through files yourself. Very much faster.
  3320.  
  3321. As each definition appears in a lookup window, a selection is made for
  3322. you. For functions, the function name and parameter list are selected,
  3323. and for all other terms the name of the term itself is selected.
  3324.  
  3325. Here’s a general example illustrating typical use of regular lookup:
  3326.     •    you type the name of a function in one of your working windows, but
  3327.         the AutoLook window doesn’t change: this means your spelling was off
  3328.     •    press the <Enter> key, and a lookup window appears, holding several
  3329.         definitions that come closest to your spelling
  3330.     •    the first one shown isn’t the one you wanted: press <Enter>
  3331.         repeatedly to advance through the definitions. Normally the one you
  3332.         want will be among the first three. Or, hold down the <Option>
  3333.         or <Command> key and click-and-drag in the title bar to pick
  3334.         from a popup menu of alternates
  3335.     •    viewing the function you want, use Paste Selection Behind to copy
  3336.         the function name and parameters which have been selected for you,
  3337.         return to your working window, and paste the function name (now
  3338.         correctly spelled) and parameter list over your guess—all in one step.
  3339.  
  3340. §    <Enter> for lookup, advancing, scrolling
  3341. Pressing the <Enter> key in a normal text window means “look this up”,
  3342. but in a lookup window it can also mean “advance to the next
  3343. definition”. The different behavior corresponds to your intent. Here
  3344. are the rules for <Enter> in a lookup window:
  3345.     •    to look up a name shown in a lookup window definition, double-click
  3346.         on it or click after it or type it in and press <Enter>. This is the
  3347.         same as in a regular text window.
  3348.     •    to cycle to the next definition; if you haven’t altered the default
  3349.         selection made for you in the lookup window, press <Enter>. If you have
  3350.         altered the selection, use Select All before pressing <Enter>. If your
  3351.         selection is so large that it couldn’t represent a word to be looked
  3352.         up, or if it agrees with the name of the definition already being shown
  3353.         in the lookup window, EnterAct will cycle you to the next definition.
  3354.  
  3355. The same rules apply to <Option><Enter>, which takes you back to the
  3356. preceding definition in a lookup window, but also does “sounds like”
  3357. lookup as described as few sections ahead.
  3358.  
  3359. By the way, using the <Enter> key to just scroll the top-left of your
  3360. selection into view or to toggle between showing the top and bottom
  3361. portion of a large selection still works, the same as in ordinary
  3362. editors. Once again, it comes down to your intent: try the <Enter> key
  3363. out to do lookup, advancing through definitions, and scrolling your
  3364. selection and you should quickly find that you can treat it as a “Do
  3365. What I Mean” button. On the rare occasion when it doesn't advance you
  3366. to the next definition in a lookup window, whack it twice quickly.
  3367. That'll teach it.
  3368.  
  3369. §    Looking up the clip (press <Command><Enter>)
  3370. To look up the last word on the clipboard, hold down the <Command> key
  3371. while pressing <Enter>. EnterAct’s private clipboard is updated when
  3372. you switch in and out. So to look up a term encountered while using
  3373. some other editor:
  3374.     •    Copy just the term
  3375.     •    switch to EnterAct (an appropriate project with built dictionary
  3376.         should be open)
  3377.     •    hit <Command><Enter>
  3378.  
  3379. A lookup window will appear after you press the <Enter> key, showing
  3380. the dictionary entry that best matches what you typed, or those that
  3381. come closest if your spelling erred, just as if you typed the word in
  3382. a text window and pressed <Enter>.
  3383.     
  3384.     OR just leave your AutoLook window in front -- when you return
  3385.         to EnterAct, the AutoLook window will automatically display
  3386.         whatever info it can for the last word on the clipboard. This
  3387.         lets you use EnterAct as a high-speed lookup helper when
  3388.         you're working mainly with some other editor. Just arrange
  3389.         your windows so that you can see the AutoLook window when
  3390.         you're in the other editor, then having a definition in view is
  3391.         as easy as Copy, click on the AutoLook window, click on your
  3392.         other editor's window. 
  3393.  
  3394.  
  3395. §    Reverse lookup (press <Shift><Enter>)
  3396. To retrieve all struct, typedef, and union definitions that contain
  3397. a word or phrase, select the word or phrase, or click after just a
  3398. single word, and press <Shift><Enter>. Reverse lookup is not
  3399. case-sensitive, but otherwise your spelling must be exact. It’s very
  3400. fast, though not instant.
  3401.  
  3402. Results are shown in a lookup window, and you can view the different
  3403. definitions either by pressing <Enter> to advance to the next
  3404. definition, <Option><Enter> to view the previous one, or by
  3405. <Option>clicking in the lookup window’s title bar.
  3406.  
  3407. Here’s the lookup window that results from typing "ioFDirIndex" and
  3408. pressing <Shift><Enter>, with the dictionary containing most toolbox
  3409. headers:
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.  
  3421.  
  3422.  
  3423.  
  3424. (<Option>click in the title bar for the popup listing definitions in
  3425. any lookup window. “iofdirindex” would work just
  3426. as well as “ioFDirIndex”, and “ioFDir” would have produced similar
  3427. results, perhaps with a few more definitions shown.)
  3428.  
  3429. Reverse lookup works with a single word or a phrase up to 255
  3430. characters, and just looks for a match in struct, union and typedef
  3431. definitions regardless of where the text occurs. The most common use
  3432. is to look up a member name, but you can also use it to look up a
  3433. distinctive word or phrase in a comment that you recall seeing, perhaps
  3434. in one of your own “popup notes”, as described in “Looking up your
  3435. notes” later in this chapter.
  3436.  
  3437. As of version 3 of EnterAct, the text you're looking up must begin
  3438. with the start of a word for reverse lookup, but need not end with
  3439. a complete word.
  3440.  
  3441. Tip: type the member name using proper case, and check the AutoLook
  3442. window: it will show a list of all structs, classes, and unions that
  3443. contain that member name. And in most cases you can press <enter>
  3444. instead of <shift><enter> to produce a "reverse lookup" window. The
  3445. only real exceptions are names that are #defined, such as
  3446. #define STANDARD_FIRST_MEMBER long next;
  3447. --in this case you would have to press <shift><enter> after typing
  3448. STANDARD_FIRST_MEMBER if you wanted to see what structures made
  3449. use of it, since pressing <enter> would just show you the definition of
  3450. STANDARD_FIRST_MEMBER. But heck, only IBM and MicroSoft commit
  3451. that sort of barbarism these days....
  3452.  
  3453. §    “Sounds like” lookup (press <Option><Enter>)
  3454. When you can’t remember what case conventions were used for a name,
  3455. or your recollection of the spelling is very very vague, type in your
  3456. best guess and try <Option><Enter> instead of just plain <Enter>. This
  3457. activates “sounds like” or “phonetic” rather than regular lookup. Upper
  3458. and lower case are treated as the same, vowels are used to determine
  3459. what the surrounding consonants sound like, and consonants are
  3460. converted to standard phonetic equivalents in your guess. This “boiled
  3461. down” version of your guess is then compared with similarly boiled-down
  3462. versions of all names in your dictionary, and you will be shown the
  3463. definitions of the ones that come closest in the resulting lookup
  3464. window.
  3465.  
  3466. The different definitions available can be viewed in the same way as
  3467. with regular lookup windows: use <Enter> and <Option><Enter> to cycle
  3468. forwards and back, or <Option>click in the title bar and choose from
  3469. the popup menu.
  3470.  
  3471. Sounds-like lookup should be kept in mind as an “emergency backup”,
  3472. worth trying if regular lookup doesn’t bring up the definition you want
  3473.  
  3474. As an example, suppose you’re after the definition of ParamBlockHeader,
  3475. but misremember it as PARAMHEAD. Regular plain-<Enter> lookup would
  3476. fail in this case, since it is case-sensitive. Pressing <Option><Enter>
  3477. would work, but might also call up spurious matches (who knows what,
  3478. perhaps kPrimeHidden) since it largely ignores vowels. On the other
  3479. hand, if you misremember CopyFile as KoppeePheill then sounds-like
  3480. lookup will work, and I imagine you won’t be complaining about the few
  3481. extra spurious matches that it throws up.
  3482.  
  3483.  
  3484. §    Viewing other entries in lookup windows
  3485. <Enter> and <Option><Enter> take you forwards and backwards through
  3486. the different definitions available in any lookup window, as described
  3487. in the section “<Enter> for lookup, advancing, scrolling” a couple of
  3488. pages back.
  3489.  
  3490. For a quick overview of all entries in the lookup window, hold down
  3491. the <Option> or <Command> key and click (and drag) in the lookup
  3492. window’s title bar. A popup menu will appear, listing the first line
  3493. from each entry (or at least a good part of it), and you can go to the
  3494. entry by selecting it from the menu.
  3495.  
  3496. The first letter in each menu item indicates the type of the entry ('v’
  3497. for variable, ‘(’ for function, ‘#’ for define etc). For details, see
  3498. “Hints with lookup” below.
  3499.  
  3500. (<Option>click-and-drag in the title bar)
  3501.  
  3502.  
  3503.  
  3504.  
  3505.  
  3506.  
  3507.  
  3508.  
  3509. §    For faster lookup
  3510. If lookup on average takes longer than you’re willing to wait when your
  3511. spelling is off, the simplest cure is to trim unneeded files from your
  3512. project, thus reducing the size of your dictionary. See “Project memory
  3513. needs” in the “Projects” chapter for a guide to trimming files, and
  3514. also the document “EnterAct memory needs”. Regular lookup for exact
  3515. spelling is always instant, and reverse lookup nearly so.
  3516.  
  3517.  
  3518. §    Hints with lookup
  3519. (Optional reading, for diehard powerusers)
  3520.  
  3521. When you type in a name and press <Enter>, you know what “kind of
  3522. thing” you want, but EnterAct doesn’t. Supplying EnterAct with a quick
  3523. hint will help speed up the lookup if your spelling doesn’t match an
  3524. entry, and it will in all cases limit the entries that are retrieved
  3525. to the type that you specify with the hint.
  3526.  
  3527. A hint for lookup consists of one character added after the name you
  3528. wish looked up. Normally you’ll need to first type a space and then
  3529. the one–character hint, to separate it from the name. However, the hint
  3530. for a function “(” and the hint for a #define “#” can’t be part of any
  3531. name, so the space is optional for these two.
  3532.  
  3533. Here are the hints you can supply, with examples: in all cases you
  3534. should select an insertion point just to the right of the hint just
  3535. before pressing <Enter> so that EnterAct can pick up the hint
  3536. correctly, or select the word and the hint. For all except the function
  3537. and #define hints, a bit of space (blanks or tabs) between the name
  3538. and the hint is necessary.
  3539.  
  3540. ____
  3541. Type                            Hint     Example
  3542. ----                         ----     -------
  3543. function, method      (          SomeFunc(
  3544. struct, class            s          MyStruct s
  3545. variable                   v          globalVar7 v
  3546. #define                   #          BIGNUM#
  3547. union                       u           IntOrFloat u
  3548. enum                        e          ErrorCodes e
  3549. enum constant         c           eNoMemory c
  3550. typedef                        t          MyStruct t
  3551. ____
  3552.  
  3553. In the display box of a lookup window you will see one of the above
  3554. hints for each entry, between the file name and the current entry
  3555. number. This is just to remind you that EnterAct keeps track of what
  3556. kind of thing each term is, and that it will understand the above hints
  3557. if you supply them.
  3558.  
  3559. When should you supply a hint? Almost never. Perhaps when you have a
  3560. struct, a typedef, and a variable that have very similar names, you
  3561. don’t remember the exact spelling, and you want just one of them
  3562. without the nuisance of the others. Since flipping through lookup
  3563. entries is as fast as pressing the <Enter> key once the lookup appears,
  3564. the only common reason to supply a hint is to speed up the lookup
  3565. process itself. But in this case you should first try trimming
  3566. unnecessary files from your project, as this will also speed things
  3567. up by reducing the size of your dictionary.
  3568.  
  3569. §    Number of lookup windows
  3570. With too many lookup windows on–screen at once, your screen will be
  3571. too cluttered. If too few are available, that will hamper you when you
  3572. have a complicated problem to wrestle with. The upshot is that the
  3573. maximum number of lookup windows on–screen at once must be under your
  3574. control, so you can vary this number as the situation demands. You can
  3575. change this number at any time by typing a new number in the “Number
  3576. of lookup windows” box in the Options dialog. The default number is
  3577. 4, but you can vary it from 1 to 10.
  3578.  
  3579.  
  3580.  
  3581.  
  3582.  
  3583.  
  3584.  
  3585.  
  3586.  
  3587.  
  3588.  
  3589.  
  3590.  
  3591.  
  3592.  
  3593.  
  3594.  
  3595.  
  3596.  
  3597.  
  3598.  
  3599.  
  3600. The “Number of lookup windows” includes any that you mark for keeping
  3601. around, and determines when a lookup window that is not marked for
  3602. keeping around will go away on its own. When you press <Enter>
  3603. to see a new lookup and the lookup window limit has already been
  3604. reached, one of the old lookup windows that was not marked for keeping
  3605. around will quietly go away, and the new one will replace it. There’s
  3606. no predicting which one, so if you want a lookup window to stay up
  3607. until you explicitly close it, select Keep Lookup Around while it is
  3608. the front window ( see “Keeping lookups around” below for details).
  3609.  
  3610.  
  3611. §    Number of entries per lookup
  3612. When your spelling doesn‘t match any term in your dictionary exactly,
  3613. the number of entries that are retrieved in the lookup window is under
  3614. your control. To change this number, select Options and type a new
  3615. number in the “Number of entries per lookup window” box (see
  3616. illustration just above). The default of 4 suits most cases, but you
  3617. may prefer 3 or 5. The maximum of 20 entries is useful only when your
  3618. recollection of the correct spelling has gone right out the window.
  3619.  
  3620. §    Keeping lookups around
  3621. The command for this is under the Windows menu. When you select Keep
  3622. Lookup Around with a lookup window in front, the lookup will be marked
  3623. for keeping around, which is to say it won’t close unless you close
  3624. it yourself. Other lookups not marked for keeping around may quietly
  3625. close when you ask for a new lookup after having hit the limit on the
  3626. number of lookup windows on–screen at one time.
  3627.  
  3628. When you select Keep Lookup Around for a lookup window, the beginning
  3629. of the window title will change from •• to ¶¶ to show you that it is
  3630. marked for keeping. A ¶ is a Paragraph mark, which starts with P, and
  3631. that stands for Permanent.
  3632.  
  3633.  
  3634.  
  3635.  
  3636.  
  3637.  
  3638.  
  3639.  
  3640.  
  3641.  
  3642. A lookup window marked for keeping will close only if you select Close
  3643. or Close All, or close the project, or leave EnterAct. In other words,
  3644. it’s as permanent as a regular text window.
  3645.  
  3646.  
  3647. Since the AutoLook window changes so often, if you want to preserve
  3648. an entry you should look it up in the usual way, by double-clicking
  3649. on or clicking just to the right of the word (or partial word) and
  3650. pressing the <Enter> key. You can do the lookup right in the AutoLook
  3651. window if you wish.
  3652.  
  3653. After you’ve used the AutoLook window for a bit, it serves as a
  3654. spelling checker for terms. If you don’t detect a slight
  3655. flicker in the AutoLook window out of the corner of your eye when you
  3656. type the name of a term that should be in your dictionary, take a
  3657. glance at the AutoLook window—if the definition or prototype isn’t
  3658. there, you have a spelling error.
  3659.  
  3660.  
  3661. §    Looking up your notes
  3662. Here’s how to build your own hard–won notes and observations about
  3663. programming the Macintosh into your dictionary, for quick retrieval
  3664. by name. You might call them “popup” notes, but as you’ll see, they’re
  3665. just a variation on looking up C terms and the notes appear in the
  3666. AutoLook window or a regular lookup window.
  3667.  
  3668. Note files consist of fake C constructs, the sole content of each
  3669. construct being a comment which contains the specific note. Suppose,
  3670. for example, one of your notes concerns the modification date
  3671. (“modDate”) for a file. To be able to retrieve the note, you first need
  3672. to think of a memorable name for it, such as “modDateNote”. Then, in
  3673. your note file, you would set up the dictionary entry like this:
  3674. ____
  3675. struct modDateNote
  3676.     {
  3677.     /*
  3678.     Paste the note in here, within a comment
  3679.     that makes up the entire "struct" body.
  3680.     */
  3681.     };
  3682. ____
  3683. The note goes inside a comment, which makes up the body of a struct.
  3684. Placing the note inside a comment is necessary, to prevent the
  3685. dictionary builder from trying to interpret your text as C code. There
  3686. are other constructs you can use, such as
  3687. ____
  3688.     #define modDateNote /*
  3689.      Paste the note in here, within a comment
  3690.      that makes up the entire "define" body.
  3691.     */
  3692. or
  3693.     int modDateNote /* your note here
  3694.         in a comment */;
  3695. ____
  3696. but a struct is definitely the best, since reverse lookup can then be
  3697. used to retrieve a note based on some distinctive word or phrase that
  3698. it contains.
  3699.  
  3700. Since notes are always placed inside C comments, you should avoid C
  3701. comment starts and ends (/* and */) within the note itself.
  3702.  
  3703. It remains only to persuade EnterAct to build such a file into your
  3704. dictionary. EnterAct will do so for files that are in the left or
  3705. middle pane of your project, and by default if a file name ends in “.c”
  3706. or “.h” etc it is added to the left or middle pane respectively. However,
  3707. a slightly nicer approach is to give your note files an ending that
  3708. describes what they are. A reasonable choice would be “Notes”, and then
  3709. your note files would have names like “File.Notes”, “Memory.Notes”,
  3710. “Interface.Notes”. To instruct EnterAct that files with names ending
  3711. in “Notes” should go in the left or middle pane, select the File
  3712. Extensions command and type in the file extension (eg “Notes”) that
  3713. you choose for your note files—see the “Custom file extensions” section
  3714. in the “Projects” chapter for an example. Which pane these files go
  3715. in (left or middle) is up to you. Using a custom extension rather than
  3716. the default “.c” or “.h” for your note files will also help prevent
  3717. confusion if other people examine your work.
  3718.  
  3719. Now add the note files to your project, select Update Dictionary, and
  3720. you can retrieve any note to the AutoLook window by typing its name
  3721. in any text window, and pressing <Enter> will place the note in a
  3722. separate new lookup window. If the name of the note consists of the
  3723. exact topic followed by “Note” then it will be easy to remember. And
  3724. if you place a comment in your source code containing the name of the
  3725. note, such as     /* see modDateNote */ 
  3726.  
  3727. then all you have to do is double-click on the note name (and press
  3728. <Enter> if you want a more permanent view than the one shown in the
  3729. AutoLook window).
  3730.  
  3731. A note can be of any length, and if you edit it heavily you can
  3732. probably clean up the appearance afterwards with Reformat Selection.
  3733.  
  3734. For an example of a note file, see the file “hAWK_notes.h” on disk 2.
  3735. As a specific example,
  3736. ____
  3737.     if ((**availRgn).rgnSize > 10) /* see RegionNote */
  3738.         {
  3739.         yPos = 5;
  3740.         y = *(((int *)(*availRgn)) + yPos);
  3741.         while (y != 32767)
  3742.             {
  3743.             xPos = yPos + 1;
  3744.             ...etc
  3745. ____
  3746. might look like Greek to me if I come back to review it, but by
  3747. clicking to the right of RegionNote  in the comment and pressing
  3748. <Enter> I can view my hard–won note on regions that explains in more
  3749. detail what’s going on:
  3750.  
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.  
  3758.  
  3759.  
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.  
  3767.  
  3768. Often it’s simpler to just place a “go to” link in your code
  3769. (consisting of a file name followed by a marker name, as detailed in
  3770. the “‘Go’ commands” chapter). “Go to” links have two advantages over
  3771. popup notes: any text in any document, including support documents,
  3772. can be marked for use a link, and the text at the link can include
  3773. illustrations. But “popup” notes as described above have two advantages
  3774. over “go to” links: they appear in politely placed and sized windows,
  3775. as do all lookup windows, and you can view several notes from the same
  3776. file in separate windows. A mix of “Go to” links to access existing
  3777. or complex documents, and popup notes to retrieve details on specific
  3778. programming tasks might be best.
  3779.  
  3780. §    EnterAct as a "definition finder" for other editors
  3781. To use EnterAct as a "definition finder" with other editors:
  3782.     •    read enough here to learn how to create a project, build
  3783.     a dictionary, and show the "AutoLook" window. Knowing
  3784.     how to call up "lookup" windows by pressing the <Enter>
  3785.     key is also useful.  That's all above here.
  3786.     •    when you're using the other editor, also run an EnterAct
  3787.     project with contents roughly corresponding to the code
  3788.     you're working on - have the "AutoLook" window open,
  3789.     as the frontmost text window in EnterAct. Your project
  3790.     dictionary should be reasonably up to date.
  3791.     •    to look up a term with EnterAct; Copy it in the other editor,
  3792.     and switch to EnterAct. If you don't immediately see the
  3793.     definition in the AutoLook window (rare), press
  3794.     <Command><Enter>. To look up the class or struct that
  3795.     contains a particular member, press <Shift><Command><Enter>.
  3796.  
  3797. §    Looking it up with THINK Reference or Toolbox Assistant
  3798. You'll see "Find in THINK Reference" and "Find in Toolbox Assistant"
  3799. under EnterAct's Search menu: to get them working, create a folder
  3800. named "Tools" or "(Tools)" next to EnterAct at the same level, and
  3801. drop aliases of THINK Reference and QuickView into it. When you
  3802. want to look something up, either select a term or click just after
  3803. it and issue the appropriate menu command (the command key
  3804. equivalents <Command><-> and <Command><4> are worth memorizing).
  3805.  
  3806.  
  3807. -    -    -    -    -    -    -    -    -    -    -    -
  3808. Seeing where a term is defined
  3809. -    -    -    -    -    -    -    -    -    -    -    -
  3810. §    <Option>double–click
  3811. To see the file in which any dictionary term is defined, hold down the
  3812. <Option> key while double–clicking on the term. EnterAct will enter
  3813. the term in the Find dialog (the equivalent of Enter Selection), open
  3814. the file where the term is defined, and scroll to the first instance
  3815. of the term in the file.
  3816.  
  3817. Just a reminder, to keep all of EnterAct's capabilities in tiptop shape,
  3818. including definition finding, do an "Update Dictionary" at least every
  3819. few hours when you're creating code. In return you'll have among other
  3820. things a definition finder that actually works, with data members,
  3821. local variables, "const" declarations, and #defines, as well as the
  3822. usual suspects.
  3823.  
  3824. Most of the remainder of this chapter deals with special cases,
  3825. such as what to do when there are multiple definitions of a name.
  3826.  
  3827. (Note you can look up the definition of a full method name, in the
  3828. format "class_name::method_name", by <Option>double-clicking
  3829. on the class name, dragging over to the method name to select it
  3830. as well, and then releasing the mouse. Or if you prefer you can
  3831. look it up by selecting both names and then using the Find
  3832. Definition command.)
  3833.  
  3834. Here's an example of looking up a class definition:
  3835.  
  3836.  
  3837.  
  3838.  
  3839.  
  3840.  
  3841.  
  3842.  
  3843.  
  3844.  
  3845.  
  3846.  
  3847.  
  3848.  
  3849.  
  3850.  
  3851.  
  3852.  
  3853.  
  3854.  
  3855.  
  3856.  
  3857.  
  3858.  
  3859.  
  3860.  
  3861. (those are old-style windows, but the idea is the same....)
  3862.  
  3863. If you are viewing just a method name, without the class name:
  3864.     •    bring up your AutoLook window (you'll find it's useful all the
  3865.         time)
  3866.     •    click after or double-click on the method name in your source
  3867.         window
  3868.     •    AutoLook will show a complete list of prototypes for the method
  3869.         name
  3870.     •    select the one you want, class name and method name inclusive,
  3871.         in the AutoLook window and use Find Definition
  3872.     •    or <Option>double-click on the class name, drag to the method
  3873.         name, and release the mouse
  3874.  
  3875. For example, to view the definition of "DoSpecificCommand" in
  3876. the class "TFlatPage", when viewing just
  3877. "someObject->DoSpecificCommand(1,2)", you would click just
  3878. after "DoSpecificCommand" to see the following in the
  3879. AutoLook window:
  3880. ____
  3881.     OSErr TFlatDocument :: DoSpecificCommand
  3882.         (short     stdCommandNumber,
  3883.         long    misc)
  3884.         
  3885.     OSErr TFlatEdit :: DoSpecificCommand
  3886.         (short     stdCommandNumber,
  3887.         long    misc)
  3888.         
  3889.     OSErr TFlatPage :: DoSpecificCommand
  3890.         (short     stdCommandNumber,
  3891.         long     misc)
  3892. ____
  3893. --then select "TFlatPage :: DoSpecificCommand", and use the
  3894. Find Definition command to jump to the definition. Or <Option>
  3895. double-click on one of the words, drag to the other, and release
  3896. the mouse.
  3897.  
  3898. If your spelling of the method name is off, and nothing shows in the
  3899. AutoLook window, click just after your guess at the name and press
  3900. <Enter>. If your guess was close enough, the resulting lookup window
  3901. will hold entries for all methods with the correct name. Hold down
  3902. the <Option> key and click in the title bar of the lookup window to
  3903. view a list of the methods -- if you see the right one, select it,
  3904. and your desired one will appear in the body of the lookup window,
  3905. where you can <Option>double-click or use Find Definition.
  3906.  
  3907. §    Find Definition
  3908. Find Definition is useful with parts of a word (such as just the
  3909. WindowData  part of WindowDataPtr )—just select the exact term you want
  3910. to view the defining instance of, without regard for what comes before
  3911. or after it.
  3912.  
  3913. Find Definition ignores trailing spaces or tabs, and also accepts hint
  3914. characters in much the way that lookup does. You can survive quite
  3915. nicely without knowing what a "hint" character is.
  3916.  
  3917.  
  3918. §    If there are multiple definitions
  3919. If you have several methods with the same name, use the
  3920. AutoLook window to pick the right one as described just above.
  3921.  
  3922. In the general case, you can jump to a particular definition of a
  3923. term as follows:
  3924.     •    select the term or click after it, and press <Enter> to look it up
  3925.     •    in the resulting lookup window, hold down the <Option> key and
  3926.         click in the window's title bar to view a popup menu listing all the
  3927.         definitions and abbreviated full path names for their locations
  3928.     •    pick the one you want, then <Option>double-click on the term
  3929.         as shown in the lookup window.
  3930.  
  3931. If the term is a static function or variable and you happen to be
  3932. viewing the file where it is defined, then <Option>double-clicking
  3933. on the name anywhere in that file will take you to the definition
  3934. in that same file.
  3935.  
  3936. Note if you want a list of all definitions of a term, the simplest
  3937. way is still to do a Batch Find, then trim the results.
  3938.  
  3939. §    Other ways of finding definitions
  3940. The AutoLook window will display definitions instantly when you select
  3941. or click after a term, greatly reducing the need to “find” definitions.
  3942. It will also show most class method definitions, and definitions for
  3943. data members (these details are subject to last-minute improvements).
  3944. And of course you can retrieve the definition of a term to a separate
  3945. lookup window by clicking after the term and pressing the <Enter> key.
  3946.  
  3947. “Go to” links, as explained in the “‘Go’ command” chapter, can be used
  3948. to jump to any marked location in any file. This includes function and
  3949. method definitions  if you are using Automark to mark your source files
  3950. in the default way.
  3951.  
  3952. The "Cross-Reference" index command (chapter 22) can generate a
  3953. cross-reference of C (only) terms in your source code that is compatible
  3954. with EnterAct’s "Go to" command. These “file-name line-number”
  3955. references can go out of date if you edit your files, but are handy
  3956. for files that don’t change often.
  3957.  
  3958. -    -    -    -    -    -    -    -    -    -    -    -
  3959. Browsing
  3960. -    -    -    -    -    -    -    -    -    -    -    -
  3961. §    The Browse command
  3962. The window produced by this command shows a “family tree” of the
  3963. classes in your project, as of your last dictionary update, and also
  3964. allows you to quickly view any class or method definition. It will
  3965. close when you close your project, and will update automatically when
  3966. you update your project dictionary.
  3967.  
  3968. In the browser, "user"-defined class names are underlined, whereas
  3969. <system>-defined classes are not.
  3970.  
  3971. The solid black horizontal and vertical lines connect each child to
  3972. the first of its parents. If a class inherits from multiple parents,
  3973. light colored lines connect the middle of each parent to the left or
  3974. right end of each child. For example, given
  3975. ____
  3976.     class A : B, C, D {...
  3977. ____
  3978. you would find in the browser window a set of solid horizontal and
  3979. vertical lines connecting A to B, and light colored lines would connect
  3980. the middles of C and D to the left or right end of A.
  3981.  
  3982. If a class contains other classes or structs as members, they will
  3983. be listed beneath the class name, separated from it by a white line.
  3984.  
  3985. To view the definition of a class, double–click on the class name. This
  3986. works much like <Option>double-click or Find Definition in a text
  3987. window. This works with both a "main" class name and any of its
  3988. member class or struct names.
  3989.  
  3990. To view a method definition, click and hold on the owning class name:
  3991. after a brief pause (your double–click time, actually) a popup menu
  3992. will appear listing all of the class’s methods. You should then select
  3993. the method you want and release the mouse button, as if you hadn’t
  3994. guessed. This also works with member class names (as of this
  3995. writing, it's untested with member struct names.)
  3996.  
  3997. To view a popup of all methods in a class AND all methods that
  3998. it inherits, hold down the <Command> key and click and hold on
  3999. the class name. This list can be quite long, and may take several
  4000. seconds to generate--please be patient the first few times you
  4001. try it. Inherited private methods are not shown, and virtual methods
  4002. are indicated with a "v" before the name.
  4003.  
  4004. If your family tree of classes involves a great deal of multiple
  4005. inheritance, the many light colored lines may become too tangled to
  4006. decipher, and even obscure class names. To display just the colored
  4007. inheritance lines for one class, click once on the class name (all
  4008. colored lines not connecting to the class will disappear). To add
  4009. lines for other classes, click on the class names with the <Shift>
  4010. key held down. Similarly, you can suppress the colored lines for one
  4011. class by <Shift>clicking on it. To show all colored lines again, click
  4012. once on the white background between classes. Double-clicking to
  4013. show a class definition does not suppress any colored lines, and neither
  4014. does the click-and-hold to view a method popup.
  4015.  
  4016. Instead of trying to follow the colored lines, you can view the parents
  4017. of a main class by holding down the <Option> key and
  4018. clicking on its name to view a popup of mom and pop etc. Note that
  4019. releasing the mouse over one of the parents will take you to its
  4020. definition, a feature I included mainly because a popup is supposed
  4021. to do something.
  4022.  
  4023. Classes without proper parents (orphans, if you like) will always
  4024. appear in the left–most column of your browser window. A quick look
  4025. down the left column will reveal whether you have any unintentional
  4026. orphans, perhaps due to misspelling the parent class name in the class
  4027. definition. 
  4028.  
  4029.  
  4030.  
  4031.  
  4032.  
  4033.  
  4034.  
  4035.  
  4036.  
  4037.  
  4038.  
  4039.  
  4040.  
  4041.  
  4042.  
  4043.  
  4044.  
  4045.  
  4046.  
  4047.  
  4048.  
  4049.  
  4050.  
  4051.  
  4052.  
  4053.  
  4054.  
  4055.  
  4056. (Note EnterAct works fine with CodeWarrior etc classes, for which
  4057. there may be many base classes in the leftmost column.)
  4058.  
  4059. §    Finding classes in the Browser window
  4060. To bring a particular class into view, type the first part or some
  4061. distinctive part of its name. The name will flash once.
  4062.  
  4063. You can also use the Find dialog and the Find Again command to
  4064. find classes in the browser window (eg if you're looking at the
  4065. source for a class and want to see where the class is in the
  4066. browser, use Enter Selection to enter the class name in the Find
  4067. dialog, then bring the browser to the front and do a Find Again).
  4068.  
  4069. §    Method and class popups
  4070. (This is a summary of popups, as described above)
  4071.     • to view the methods associated with a class, click and hold
  4072.     on the class name.
  4073.     • to view all inherited methods as well, hold down the <Command>
  4074.     key while you click and hold on the class name. If the list is
  4075.     gigantic, it may take several seconds to generate the popup, so
  4076.     please be patient the first few times you try this.
  4077.     • to view a list of the immediate parents of a class, hold down
  4078.     the <Option> key while you click and hold on the class name.
  4079.  
  4080. §    Browsing classes without the browser
  4081. Nothing new to seeing class definitions—click to the right of the class
  4082. name and press <Enter>, or just look in the AutoLook window.
  4083. You will typically find the class name of an object as the first name
  4084. in the statement where it is defined, as in
  4085. ____
  4086.     TClassName        *objectName;
  4087. ____
  4088. You can also, of course, look up a class by typing the name and
  4089. pressing <Enter>, and in all cases your spelling just needs to be
  4090. reasonably close, not exact. In either case, the definition will appear
  4091. in the AutoLook window if you have it open.
  4092.  
  4093.  
  4094. §    Browsing methods without the browser
  4095. (The approach below is for use when your spelling of a method
  4096. name is incorrect, or the owning class is determined at runtime.
  4097. If your spelling is correct or the class is "fixed", you will see
  4098. the appropriate prototype in the AutoLook window when you
  4099. click after or double-click on the method name. To go to the
  4100. definition, select the full "class_name::method_name" in the
  4101. AutoLook window, then use the Find Definition command, or
  4102. <Option>double-click, dragging to select both names before
  4103. releasing the mouse.)
  4104.  
  4105. Method browsing is a bit trickier, since if you have something like
  4106. ____
  4107.     "currentObject->Draw();"
  4108. ____
  4109. and there are several different classes with Draw() methods, then
  4110. EnterAct does not know specifically which Draw() method you want. If
  4111. there is only one method in your project with a given name, then the
  4112. lookup window will contain just one entry, but if there are several
  4113. then the lookup window will contain all of them (up to a maximum of
  4114. 60). For example, if you were to press <Enter> with an insertion point
  4115. to the right of Draw above, then the lookup window might contain
  4116. entries for void Circle::Draw(), void Square:: Draw(), void
  4117. Oval::Draw() and so on. When there are several entries like this, you
  4118. can cycle through them by pressing the <Enter> key, and back up by
  4119. pressing <Option><Enter>. There are some illustrations of this just
  4120. ahead.
  4121.  
  4122. This raises the question of how to find where a method is defined. The
  4123. general approach is described in the chapter “Seeing where a term is
  4124. defined”, but the approach for a method has one extra step:
  4125.     •    double-click on the method name, and a list of all methods with that
  4126.         name will appear in the AutoLook window;
  4127.         or, press <Enter> and cycle through the lookup window until
  4128.         you find the method you want, based on the name of the owning class
  4129.     •    then select the entire name, consisting of the owning class name,
  4130.         the two colons, and the method name, in general
  4131.         className::methodName
  4132.     •    and then select Find Definition.
  4133.     •    (or <Option>double-click, ya ya you know already)
  4134.  
  4135. There is one exception to this: if there is only one method in your
  4136. project with the name in question, then a standard <Option>
  4137. double–click on just the method name will jump you to the file where
  4138. that method is defined. However, if there are several methods with the
  4139. same name  in different classes, there’s no predicting which definition
  4140. you will see if you just <Option> double–click on the method name—best
  4141. to look up the method first, and use Find Definition on the full name
  4142. of the exact one you want.
  4143.  
  4144. By the way, when viewing the full “className:: methodName” of a method,
  4145. you can look up the definition of the owning class of the method by
  4146. clicking at the right end of the class name, before the colons, and
  4147. pressing <Enter>. If the instance of the method name you’re viewing
  4148. doesn’t have the class name attached, look up the method name as
  4149. decribed just above to see the full method name including the owning
  4150. class, and then do your lookup for the class in the lookup window shown
  4151. for the method.
  4152.  
  4153. If you want to see where a method is defined, but can’t remember the
  4154. exact spelling of the name, type your best guess and press <Enter>.
  4155. The true name you wanted will probably be among the first few entries
  4156. in the lookup window, and then you can proceed with an <Option>
  4157. double–click or Find Definition right in the lookup window to get to
  4158. the file you want to see.
  4159.  
  4160. If you want lookup for a method when you’re not sure of the spelling,
  4161. and want to restrict the lookup to just methods, type a bit of the
  4162. class name and two colons just before the method name—even C::method
  4163. will do (even if the class name doesn’t contain a “C”—it’s the two
  4164. colons which signal that a method is wanted).
  4165.  
  4166. EnterAct is not a fancy bells–and–whistles browser, but it does allow
  4167. you to look everything up quickly. And, it has two advantages over any
  4168. other browser: your code doesn’t have to be perfectly compilable, just
  4169. reasonably close; and your spelling when you want lookup for anything
  4170. (including methods and classes) doesn’t have to be perfect, just close
  4171. enough to be distinctive. Try that on your SmallTalk!
  4172.  
  4173.  
  4174. A method-browsing example:
  4175.  
  4176. Here we've typed "EstablishPort" in a new window, and then pressed
  4177. the <enter> key: the corresponding lookup window holds entries for
  4178. all EstablishPort methods. The cursor is caught in the act of
  4179. <option>clicking in the title bar of the lookup window to select
  4180. the entry for LOffscreenView::EstablishPort.
  4181.  
  4182.  
  4183.  
  4184.  
  4185.  
  4186.  
  4187.  
  4188.  
  4189.  
  4190.  
  4191.  
  4192.  
  4193.  
  4194.  
  4195.  
  4196.  
  4197.  
  4198.  
  4199.  
  4200.  
  4201.  
  4202. After the LOffscreenView::EstablishPort appears in the lookup window,
  4203. <option>double-clicking on it takes us to its definition.
  4204.  
  4205.  
  4206.  
  4207.  
  4208.  
  4209.  
  4210.  
  4211.  
  4212.  
  4213.  
  4214.  
  4215.  
  4216.  
  4217.  
  4218.  
  4219.  
  4220.  
  4221.  
  4222.  
  4223.  
  4224. -    -    -    -    -    -    -    -    -    -    -    -
  4225. Documents and windows
  4226. -    -    -    -    -    -    -    -    -    -    -    -
  4227. §    New, Open, Close
  4228. New under the File menu means a new text window. To create a project,
  4229. select New Project from the EnterAct menu. A new lookup window appears
  4230. automatically whenever you look something up. New PICT windows can’t
  4231. be had, no matter what you try.
  4232.  
  4233. Open under the file menu allows you to open any TEXT or PICT document.
  4234. To open a project, select Open Project from the EnterAct menu. 
  4235.  
  4236. Close will close the front window, whatever it is, and the key
  4237. equivalent <Command><W> is often handy. Close Project will close the
  4238. project window whether it is in front or not. Only one project can be
  4239. open at a time, so if you select Open Project while a project is open
  4240. you will be asked to confirm putting away the current project. The same
  4241. applies if you select New Project.
  4242.  
  4243. To close all text windows, select Close All from the Windows menu. This
  4244. will not close your project or the Find dialog.
  4245.  
  4246. EnterAct provides some support for unix and DOS files. Specifically,
  4247. you can open, change, and save them, and change from one type to
  4248. the other using the little popup menu at bottom-left of the windows.
  4249.  
  4250.  
  4251. §    Save, Save As, Revert
  4252. Save applies only to proper text documents (not lookup windows) and
  4253. to PICT’s. Saving a PICT will alter only the window location that
  4254. EnterAct saves with any file. To save the contents of a lookup window,
  4255. Copy what you want and Paste it into a regular text window. Projects
  4256. are saved automatically, when you update the dictionary, add files,
  4257. or close the project. 
  4258.  
  4259. Save As can be used with text and PICT documents, and with a project
  4260. as well. In particular, you can set up a project to use as
  4261. “stationery”, with the font and window location preset, and commonly
  4262. needed files already added—for details see the “Projects” chapter,
  4263. section “Creating a project”.
  4264.  
  4265. Revert applies to text and PICT documents only (with PICT’s only the
  4266. position on your screen is reverted).
  4267.  
  4268. §    Close and Save Documents
  4269. These two new commands are under the Windows menu, supplementing
  4270. the old Close All and Save All. The Close Documents and Save
  4271. Documents commands affect only windows which already have a
  4272. corresponding file on disk: in particular, “untitled” windows are left
  4273. alone. By contrast, Close All also closes lookup windows and asks you
  4274. to save any “untitled” windows—and Save All also asks you about
  4275. saving “untitled” windows.
  4276.  
  4277. §    Autorevert
  4278. When you select Autorevert for an open document, EnterAct will check
  4279. the disk file for the document every 10 seconds, and refresh the
  4280. document’s window if the contents of the file have changed. This
  4281. continues until you select Autorevert for the document again (it’s a
  4282. toggle) or until you close the window. To remind you that the
  4283. document’s window is being autoreverted, a “disk-to-window” icon will
  4284. be shown in the window’s display box.
  4285.  
  4286.  
  4287.  
  4288.  
  4289.  
  4290. Typically EnterAct will not detect that a file has been changed until
  4291. it is closed by the program that is changing it.
  4292.  
  4293. While implemented in a general way, Autorevert is primarily meant for
  4294. use with hAWK programs that print ongoing progress messages to disk.
  4295. Several of the supplied hAWK programs print messages to the file
  4296. “$tempProgress”, and by monitoring this file via Autorevert you can
  4297. watch how programs are progressing as they run. For more on this use
  4298. of Autorevert see Appendix 2.
  4299.  
  4300. Every decent app needs one nutty gizmo. Hence Autorevert.
  4301.  
  4302. §    Modify Read Only
  4303. EnterAct watches out for Projector 'ckid' resources, and won't let you
  4304. change a file if it has been checked out of SourceServer as
  4305. "read only". When a document can't be changed for this reason, a small
  4306. pencil with a slash through it will be shown in the display box of
  4307. its window.
  4308.  
  4309. When you need to edit a file that has been checked out as "read only",
  4310. select "Modify Read Only" from the File menu. This makes the file
  4311. fully editable, and alters the 'ckid' resource slightly so that
  4312. SourceServer will know the file has been changed when you check
  4313. it back in. "Editable" meaning you can change the text in the window
  4314. and save the changes, just as with a regular document.
  4315.  
  4316. No icon is displayed for "modifiable read only" files, mainly because
  4317. your author can't figure out what the heck that means. Whatever
  4318. else it does, it severely compromises version control.
  4319.  
  4320. If you want to ignore 'ckid' read-only stuff altogether because it
  4321. doesn't apply to you, deselect the "Ignore 'ckid's" option in the
  4322. Options dialog (see illustration just below).
  4323.  
  4324.  
  4325. §    Saving window locations
  4326. Saving window locations is nice, provided you aren’t pestered all the
  4327. time to save your changed location when you close a window. In
  4328. EnterAct, saving window locations takes the place of neatly tiling and
  4329. stacking windows. By default, EnterAct will save window locations
  4330. whenever you save a text or PICT document. If you would rather not have
  4331. window locations saved, call up the Options dialog and uncheck the
  4332. “Save document window locations” item. Any saved locations will also
  4333. be ignored when a document is opened if you uncheck this item.
  4334.  
  4335.  
  4336. §    ... without being pestered
  4337. Beneath the “Save document window locations” item in the Options dialog
  4338. there’s another check box, “...but don’t pester me about saving
  4339. locations”. Both of these options are on by default. The “don’t pester”
  4340. part means that you will not be asked if you wish to save a text window
  4341. when you close it if all you’ve done is change the window’s location
  4342. on the screen. 
  4343.  
  4344. The location of the project window is always saved (this is automatic)
  4345. regardless of your options.
  4346.  
  4347.  
  4348.  
  4349.  
  4350.  
  4351.  
  4352.  
  4353.  
  4354.  
  4355.  
  4356.  
  4357.  
  4358.  
  4359.  
  4360.  
  4361.  
  4362.  
  4363.  
  4364.  
  4365.  
  4366.  
  4367.  
  4368. §    Newly opened windows can be long or short
  4369. If the “Save document window locations” item in the Options dialog has
  4370. a check mark, and if a document you open has a window location saved
  4371. with it, then EnterAct will restore your document to its saved
  4372. location. Otherwise, EnterAct won’t have a remembered location for the
  4373. window, or will ignore it (this is especially true of a new text
  4374. window). You can roughly control the length of these windows with the
  4375. radio button options “Windows open short / long by default” in the
  4376. Options dialog. Long windows will reach all the way to the bottom of
  4377. your main screen when they open. Short windows will indeed be
  4378. relatively short on a large screen, but will fill most of a small
  4379. screen.
  4380.  
  4381. The default is short windows. Note that you can grow just the length
  4382. of any text window down to the bottom of the screen by holding down
  4383. the <Option> key while clicking in the zoom box. And it won't cover up
  4384. your AutoLook window.
  4385.  
  4386. The default width of a new window is fixed at a moderate size, about
  4387. 74 characters in Monaco 9 (this is also a near–maximum nice width for
  4388. printing). For existing documents, the width will be based on the first
  4389. 20 lines of the text, within reasonable limits.
  4390.  
  4391. Note that if a document is being opened during restoration of a
  4392. project’s context its location will be where you last left it, not
  4393. necessarily the same as where you last saved it.
  4394.  
  4395.  
  4396. §    <Option>–Zoom zooms just the length
  4397. If you hold down the <Option> key while clicking in the zoom box of
  4398. a window, only the length will be affected. If you’re zooming out (the
  4399. first zoom is usually an “out”), the bottom of the window will drop
  4400. down to the bottom of your screen, rather in the way a menu drops down.
  4401. Zooming in is not affected by the <Option> key. 
  4402.  
  4403. The window you're zooming will stop short of covering your AutoLook
  4404. window if it's in the way.
  4405.  
  4406.  
  4407. §    Number of windows at one time
  4408. Restrictions on the maximum number of windows on–screen at one time
  4409. are as follows:
  4410.  
  4411. ____
  4412. regular text, PICT    memory-limited
  4413. lookup                        10 or fewer (see below)
  4414. project, Browser, AutoLook, Find - one of each at a time.
  4415. ____
  4416.  
  4417. Note you can print any number of EnterAct  text files by selecting them
  4418. in the Finder and then selecting the Finder’s print command, since the
  4419. files will be opened, printed, and closed one at a time.
  4420.  
  4421. While the hard upper limit on lookup windows is 10, you can set the
  4422. maximum number on–screen to any number between 1 and 10 using the
  4423. Options dialog. The default number is 4.
  4424.  
  4425.  
  4426. §    The Windows menu
  4427. Consisting of: Close All, Close Documents, Save All, Save Documents,
  4428. Keep Lookup Around, and a list of your open windows, with the project
  4429. first and others in order from front to back on your screen.
  4430.  
  4431. Close All affects text, lookup, and PICT windows. If it needs saving,
  4432. you’ll be asked. Lookup windows will be quietly closed, since they
  4433. cannot be saved. The combination of Close All with remembered window
  4434. locations lets you arrange groups of documents to work with at one
  4435. time, and switch between groups with a minimum of nuisance.
  4436.  
  4437. Save All will save any text or PICT documents that need it (note lookup
  4438. windows aren’t saveable). If a text window hasn’t been saved yet,
  4439. you’ll see the standard Save As dialog. If you use MultiFinder or
  4440. System 7, and you decide to switch off the “Safe switching under
  4441. MultiFinder” option in the Options dialog, I would strongly recommend
  4442. that you use Save All or preferably Close All before switching to
  4443. another application.
  4444.  
  4445. Close Documents and Save Documents do the same as the Close and
  4446. Save All versions, but affect only documents, ie windows that
  4447. correspond to an existing disk file.
  4448.  
  4449. Keep Lookup Around applies only to lookup windows. The maximum number
  4450. of lookup windows on–screen is fixed (although you can change this
  4451. number at any time in the Options dialog), and when this limit is
  4452. reached the next lookup window that you call up will quietly close one
  4453. of the old lookup windows to make room. To avoid having a particular
  4454. lookup window disappear later on you, select Keep Lookup Around when
  4455. the lookup window is in front. The two bullets •• at the beginning of
  4456. the lookup window’s title will change to ¶¶, showing that it won’t go
  4457. away until you yourself close it. Note especially that Close All will
  4458. close all lookup windows, whether or not they are marked for keeping.
  4459.  
  4460. To bring a window to the front, select it by name from the lower part
  4461. of the Windows menu. If a project is open, it can always be brought
  4462. to the front with the menu key–equivalent <Command><zero>, which is
  4463. worth memorising. No other windows (except dialogs) have key
  4464. equivalents—if your memory is that good then in my humble opinion you
  4465. don’t need EnterAct in the first place. 
  4466.  
  4467.  
  4468. §    The display box
  4469. All text windows including lookup windows have a small “display box”
  4470. along the bottom in the horizontal scroll bar area. For a regular text
  4471. file this displays the name of the file; in a lookup window it shows
  4472. the name of the file from which the entry was taken, followed by the
  4473. (abbreviated) type of entry, the number of the current entry shown,
  4474. and the total number of entries available in the lookup window.
  4475.  
  4476. When you drag the mouse to select text in a text window, the display
  4477. box will change to show the line number that the mouse is currently
  4478. on, followed by the number of characters selected. If more  than one
  4479. line is selected, the display box will show the number of lines
  4480. selected rather than the current line number. To determine how many
  4481. lines there are in a file, use <Option><down arrow> or Go Bottom and
  4482. click on the last line of the file. To determine the number of
  4483. characters in a file, click at one end of the file and then
  4484. <Shift>click at the other end of the file.
  4485.  
  4486. A selection on one line, line number displayed:
  4487.  
  4488.  
  4489.  
  4490.  
  4491.  
  4492.  
  4493.  
  4494.  
  4495. A selection on several lines, number of selected lines displayed:
  4496.  
  4497.  
  4498.  
  4499.  
  4500.  
  4501.  
  4502.  
  4503.  
  4504. The little popup with "M" in it at bottom-left of the window allows
  4505. you to change the file format:
  4506.  
  4507.  
  4508.  
  4509.  
  4510.  
  4511.  
  4512.  
  4513.  
  4514. §    Printing
  4515. To print a text file, bring its window to the front and select Print.
  4516. A Page Setup beforehand will be needed if you wish to print in a
  4517. nonstandard way, such as sideways or with an unusual paper size. To
  4518. stop a printout, press <Command><period>.
  4519.  
  4520. Printing of PICT’s or other kinds of files is not supported, just text.
  4521. However, any illustrations in a text document (see next section) will
  4522. print properly, with automatic nudging to avoid clipping a picture off
  4523. at the bottom of a page.
  4524.  
  4525. EnterAct does not clip long lines of text, but folds the “hangover”
  4526. back to the left margin on a new line. The line-break is not always
  4527. as good as you yourself would do it, but at least you will never lose
  4528. any characters off the right edge when printing. 
  4529.  
  4530. -    -    -    -    -    -    -    -    -    -    -    -
  4531. Editing
  4532. -    -    -    -    -    -    -    -    -    -    -    -
  4533. §    Introduction
  4534. EnterAct provides all the standard text editing commands, which should
  4535. be familiar from elsewhere (THINK C, for example), and so the emphasis
  4536. in this chapter will be on EnterAct’s editing enhancements. Briefly,
  4537. they are:
  4538.     •    everything that changes a document is undoable one way or another,
  4539.         except Revert. In addition to the usual Undo/Redo under the Edit menu,
  4540.         you can also undo any one of your most-recent thousand activities, and
  4541.         limited file reversion is also available (see the “Show Activities”
  4542.         chapter)
  4543.     •    "code templates": type a template name, press <command><return>,
  4544.         and it expands into the full "template", which can be any old chunk
  4545.         of text. And <command><return> advances you through the template
  4546.     •    Paste Selection Behind combines Copy, switch to the next window,
  4547.         and Paste in one command
  4548.     •    the indentation of your code will commonly be preserved when you
  4549.         Paste or Paste Selection Behind
  4550.     •    the selection in the next–to–front window is shown in a frame,
  4551.         useful with the Paste Selection Behind and Find commands
  4552.     •    Reformat Selection can “pretty up” a comment or selection of text,
  4553.         rebreaking lines to your specified width.
  4554.     •    Syntax coloring, for line comments, strings, and ticks
  4555.     •    Graphic nesting display
  4556.     •    full Drag and Drop for text
  4557.     •    you can paste and delete PICTs in text documents, see
  4558.         "Illustrating your text" near the end of this chapter.
  4559.  
  4560. “Balance”, “Show Activities”, and “Options”, under the Edit menu, are
  4561. described in their own separate chapters later in this manual.
  4562.  
  4563.  
  4564. §    Undo
  4565. EnterAct has one level of undo and redo, via Undo/Redo under the Edit
  4566. menu. The undoable and redoable actions are: typing, Cut, Copy, Paste,
  4567. Paste Selection Behind, Clear (Backspace), Shift Left, Shift Right,
  4568. Reformat Selection, Replace, Replace and Find Again, Replace All,
  4569. and Drag and Drop.
  4570.  
  4571. Revert is not undoable, though discarded changes can often be recovered
  4572. with Show Activities. All other “undoable” changes (such as changing
  4573. the font) can be undone by reusing the same command (such as changing
  4574. the font back).
  4575.  
  4576. Just clicking the mouse or selecting a range of text does not affect
  4577. undo. Changing the window does make the last change temporarily
  4578. undoable, but you can restore the ability to undo the last change by
  4579. bringing the appropriate window to the front again.
  4580.  
  4581. To selectively undo past activities or revert files back past the last
  4582. saved version, see the “Show Activities” chapter. For these purposes,
  4583. EnterAct records your last 10,240 activities in full to disk.
  4584.  
  4585.  
  4586. §    Typing, Cut, Copy, Clear
  4587. “Typing” means hitting a sequence of keys that produces text,
  4588. intermingled with any number of <Backspace>’s. A new typing operation
  4589. begins whenever you change the insertion point or select characters
  4590. and then type something. As with all actions, just changing the
  4591. insertion point or selecting characters does not affect your ability
  4592. to undo—it’s the subsequent change to your text that does it.
  4593.  
  4594. When you type <Return> the resulting new line will have the same
  4595. indentation as the line above it, unless you hold down the <Option>
  4596. key, in which case you’ll end up flush at the left margin.
  4597.  
  4598. Cut and Copy are as you would expect, but there is one special feature:
  4599. if you want to take a screen-shot in EnterAct, first Copy a single
  4600. character, and then immediately after taking the screen-shot paste it
  4601. into your scrapbook.
  4602.  
  4603. As an aside, please see "EnterAct's magic clipboard" for a way to run
  4604. hAWK programs on whatever you Copy with EnterAct. The basic 
  4605. sequence is: you write the hAWK program you need, and start it
  4606. running; and then whenever you need the program's results, Copy
  4607. some text to give it the appropriate input, and Paste the results.
  4608. Typically the menu bar will flash to show that your program has
  4609. done something with the current clipboard's contents (this and
  4610. all other aspects of the program are under your control). This
  4611. effectively gives you programmable Copy/Paste using what has
  4612. been called the best little language in the world, and some example
  4613. programs are provided to get you going.
  4614.  
  4615. "Clear" has the same effect as the <Clear> key, and <Backspace> is also
  4616. the equivalent of a Clear if a range of text is selected. If no text
  4617. is selected, <Backspace> will delete one character, whereas Clear will
  4618. not.
  4619.  
  4620.  
  4621. §    Paste preserves indentation
  4622. At least, it does if the range of text you select to be pasted over,
  4623. or the insertion point for the paste, satisfies the requirement: “all
  4624. tabs or spaces to the left at the start”. Also, the text must have been
  4625. cut or copied with EnterAct.
  4626.  
  4627. “All tabs or spaces to the left at the start” means that the first
  4628. character you select for replacement should be the first character on
  4629. the line that is not a space or tab. If you have just an insertion
  4630. point for the Paste, then the same applies—there should be nothing but
  4631. spaces and tabs from the insertion point to the left margin. Starting
  4632. at the left margin will also do.
  4633.  
  4634. The basic rule is you shouldn’t “see” any printing characters between
  4635. the left margin and the start of your selection or insertion point.
  4636. If this rule is satisfied when you are about to Paste, then the paste
  4637. will preserve your relative indentation, removing the need to Shift
  4638. Left or Shift Right afterwards.
  4639.  
  4640. About the only special action you should take to have Paste preserve
  4641. your indentation is to open up a new line with a <Return> just before
  4642. you paste in a block of code, which you probably do anyway.
  4643.  
  4644. A selection with all tabs/spaces to the left at the start:
  4645.  
  4646.  
  4647.  
  4648.  
  4649.  
  4650.  
  4651.  
  4652.  
  4653.  
  4654.  
  4655.  
  4656.  
  4657.  
  4658.  
  4659.  
  4660.  
  4661.  
  4662. The cursor positioned on a blank line, tabbed in the appropriate
  4663. amount, just before pasting in the above selection:
  4664.  
  4665.  
  4666.  
  4667.  
  4668.  
  4669.  
  4670.  
  4671.  
  4672.  
  4673.  
  4674.  
  4675.  
  4676.  
  4677.  
  4678.  
  4679.  
  4680. After the paste (no shifting needed):
  4681.  
  4682.  
  4683.  
  4684.  
  4685.  
  4686.  
  4687.  
  4688.  
  4689.  
  4690.  
  4691.  
  4692.  
  4693.  
  4694.  
  4695.  
  4696.  
  4697.  
  4698. Paste Selection Behind also preserves indentation. And so does
  4699. Drag and Drop, if the drag starts within EnterAct.
  4700.  
  4701. §    Drag and Drop for text
  4702. Dragging and dropping text is almost entirely standard in EnterAct,
  4703. and all you need to know about D&D is:
  4704.     • you drag text around by making a selection and then dragging
  4705.     (mouse-down on the selected text, then move the mouse with
  4706.     the button still down). As you drag about, a cursor will move
  4707.     with you showing exactly where the drop will take place if
  4708.     you let go of the mouse button
  4709.     • when you drag text within its source window, you are "moving"
  4710.     it, ie it will be deleted from its original location and inserted
  4711.     where you see the cursor flashing as you move about
  4712.     • to duplicate rather than move the text when you're still in the
  4713.     source window, hold down the <option> key as you start or end
  4714.     the drag
  4715.     • if you drag the text to a different window, the original text
  4716.     in your source window will not be affected ever
  4717.     • I lied, if you drag the text to the trash it will be deleted from
  4718.     your source window
  4719.     • if the D&D starts and ends within EnterAct, your indentation
  4720.     will be preserved
  4721.     • to cancel a drag, release the mouse when it's over the top part
  4722.     of the title bar or over the original selection when you're still in
  4723.     the source window, or over the title or scroll bars when you're over
  4724.     some other window; or for that matter let go when you're in the 
  4725.     menu bar at top of the screen
  4726.     • all Drag & Drops of text (even to the trash) are undoable.
  4727.  
  4728. As you drag about in the source window, you can persuade EnterAct
  4729. to scroll the text in the window by moving your mouse to the edges
  4730. of the window (scroll bars, and small margins at the top and left).
  4731. Inactive windows, in accordance with Apple's guidelines, do not
  4732. scroll the text automatically as you drag around in them.
  4733.  
  4734. Unless or course you want them to: in which case open the Options
  4735. dialog, click on the "Edit" pane, and check the box called "Autoscroll
  4736. inactive windows when dragging". This applies only if the drag starts
  4737. in EnterAct. DON"T get too used to this, or you might forget that
  4738. it violates the guidelines! Cancelling a drag is slightly harder due to
  4739. autoscrolling, but the drag does cancel if you let go of the mouse
  4740. while autoscrolling.
  4741.     
  4742.  
  4743. §    Code templates
  4744. Save those fingers. All templates are stored in the text file
  4745. "EnterAct Code Templates", which is very easy to modify (please
  4746. take a look at it). Add this file to the folder where you keep
  4747. EnterAct, at the same level. If you save changes to your "EnterAct
  4748. Code Templates" file using EnterAct, your new templates are
  4749. instantly available (no need to quit and restart).
  4750.  
  4751. To use a template, you type its name and press <command><return>.
  4752. And <command><return> will also advance you to the next logical
  4753. insertion point in your template (or in any code for that matter).
  4754. Templates don't have to contain code, and template names can
  4755. contain any non-blank characters, not just letters and numbers.
  4756.  
  4757. To force <command><return> advancing to stop at a particular point,
  4758. put an '@' sign in the template. Then <command><return> will stop
  4759. at the '@' sign and select it. There's an example just below.
  4760. (For templates that contain C/C++/Java code, <command><return> will
  4761. advance to almost all logical insertion points, with no need for
  4762. '@' signs in the template. But feel free to put them in anywhere.) 
  4763.  
  4764. Keep all your entries flush-left, and EnterAct will adjust your
  4765. indentation when pasting your template in. Just open up a new line
  4766. and tab in to the right position before typing the entry name and
  4767. pressing <command><return>.
  4768.  
  4769. Here are two templates, from the "EnterAct Code Templates" file:
  4770. ____
  4771.  
  4772. ENTRY
  4773. for
  4774. for (; ; )
  4775.     {
  4776.     
  4777.     }
  4778.  
  4779. END
  4780. ENTRY
  4781. i
  4782. #include "@.h"
  4783.  
  4784. END
  4785.  
  4786. ____
  4787. Each entry begins with "ENTRY" on a separate line, followed by the
  4788. name of the entry on a separate line, then the body of the template
  4789. definition, and finally "END" on a separate line. To use the "for"
  4790. template, you would type "for" and then press <command><return>.
  4791. That would paste in the body of the template, and advance your
  4792. insertion point to just before the first ';'. Every subsequent press
  4793. of <command><return> would advance you to the next logical insertion
  4794. point in the template. In the "i" (for "include") template, typing "i"
  4795. plus <command><return> would replace the "i" with
  4796. ____
  4797. #include "@.h" [plus a new line]
  4798. ____
  4799. and select the '@' sign so you could type in a file name.
  4800.  
  4801. You can use templates to hold arbitrary chunks of text. For example,
  4802. if you find yourself typing "if (theErr == noErr) {}" a lot, you could
  4803. reduce this to "e" plus <command><return> with a template
  4804. entry such as
  4805. ____
  4806. ENTRY
  4807. e
  4808. if (theErr == noErr)
  4809.     {
  4810.     
  4811.     }
  4812.  
  4813. END
  4814. ____
  4815.  
  4816. Tip: add "EnterAct Code Templates" to your "Locations" menu so you
  4817. can change your templates on the fly. Remember, when you change
  4818. your "EnterAct Code Templates" with EnterAct the updated templates
  4819. are instantly available.
  4820.  
  4821. hAWK command lines are handled specially: if your template name
  4822. expands into a hAWK command line, it will all be selected, and if
  4823. you press <command><return> a second time, Enteract will run the
  4824. specified hAWK program. Here's a sample hAWK command line entry
  4825. from the code templates file:
  4826. ____
  4827. ENTRY
  4828. echo
  4829. hAWK -f$EchoFullPathNames -- MFS
  4830.  
  4831. END
  4832. ____
  4833. EnterAct treats any selection beginning with "hAWK" as a hAWK
  4834. command line. If you type "echo" in a text window and then press
  4835. <command><return>, then "hAWK -f$EchoFullPathNames -- MFS"
  4836. will be pasted in as usual for a code template, but because it's
  4837. a hAWK template, the entire line will be selected. The special
  4838. symbol "MFS" stands for all files in your multi-file selection
  4839. in your current project (the files with bullets on their left in the
  4840. project window). So to run this program for real you should first
  4841. select some file for multi-file operations in a project (see the
  4842. Search chapter) and then type "echo<command><return><command>
  4843. <return>". You will end up with a list of full path names for your
  4844. selected files in the "stdout" window.
  4845.  
  4846. Version 3.9 introduces some builtin variables for use inside your
  4847. code templates:
  4848.     • @@clip, the entire text contents of your clipboard
  4849.     • @@date, eg "Tue, Dec 31, 1996"
  4850.     • @@time, eg "1:37 PM"
  4851.     • @@year, eg "1997"
  4852.  
  4853. If you have used Internet Config to set your real name and
  4854. email address, then you can include them in templates with:
  4855.     • @@me, your name (eg "Ken Earle")
  4856.     • @@mail, your email address (eg "kearle@interlog.com")
  4857.  
  4858. You'll find some examples to try out near the top of the
  4859. "EnterAct Code Templates" file.
  4860.  
  4861. §    Selection: front, non–front
  4862. EnterAct uses your chosen highlight color to show the selection in a
  4863. text or project window when it is in front. In text windows that are
  4864. not in front, the selection is framed with a black box. With Drag and
  4865. Drop enabled (which it is by default), you can drag any selection
  4866. around, or make a copy within the same window by holding down the
  4867. <option> key as you drag.
  4868.  
  4869. The selection in the second-front text window is not shown
  4870. differently from other non-front windows, but this is the selection
  4871. that will be affected by the Paste Selection Behind command
  4872. (described in the next section), and it also shows where your search
  4873. will start from when the Find dialog is in front of your text window.
  4874.  
  4875. §    Paste Selection Behind
  4876. Paste Selection Behind does the following three actions in one : Copy
  4877. what is selected in the front window; switch to the window just behind
  4878. it; and Paste the copy in over the selection in that window. You’ll
  4879. see your selection in the next–to–front window just beforehand, as
  4880. described above. If you can’t see what is selected in the next–to–front
  4881. window, you can either trust to memory (it’s undoable) or do a “manual”
  4882. Copy, switch windows, Paste.
  4883.  
  4884. Paste Selection Behind is especially handy when switching back and
  4885. forth between your working text window and a lookup window, but it can
  4886. be used with any two text windows.
  4887.  
  4888. Your indentation will be preserved with Paste Selection Behind under
  4889. the same circumstances that apply to a Paste (see “Paste preserves
  4890. indentation” above).
  4891.  
  4892. If you want to undo a Paste Selection Behind but have switched to a
  4893. different window, bring the two windows involved in the Paste Selection
  4894. Behind to the front alternately until Undo becomes enabled. The two
  4895. windows involved are the one you pasted into, and the one you copied
  4896. from.
  4897.  
  4898. (before Paste Selection Behind: I typed "PutResInfo", but nothing showed
  4899. up in the AutoLook window so I pressed <enter> to produce the
  4900. "••PutResInfo" lookup window--WriteResInfo is what I wanted)
  4901.  
  4902.  
  4903.  
  4904.  
  4905.  
  4906.  
  4907.  
  4908.  
  4909.  
  4910.  
  4911.  
  4912.  
  4913.  
  4914.  
  4915.  
  4916.  
  4917.  
  4918. (after Paste Selection Behind)
  4919.  
  4920.  
  4921.  
  4922.  
  4923.  
  4924.  
  4925.  
  4926.  
  4927.  
  4928.  
  4929.  
  4930.  
  4931.  
  4932.  
  4933.  
  4934.  
  4935.  
  4936. §    Font, font size, tabs
  4937. Sizes for your font are restricted to sizes that are actually installed
  4938. in your system. The default font for text windows in EnterAct is Monaco
  4939. 9, with 4 spaces per tab.
  4940.  
  4941. You can also change the font for the project window. The default here
  4942. is also Monaco 9.
  4943.  
  4944. For projects only, holding down the <Option> key while changing
  4945. the font or size will give you a bold style.
  4946.  
  4947. Tabs in EnterAct are of the relative sort, meaning that when you press
  4948. <Tab> your insertion point advances to the next tab stop. Tab stops
  4949. are placed a fixed number of spaces apart, and you can change this
  4950. number with the Tabs dialog. Note that if you change the font it may
  4951. throw off your nicely–aligned code, so it’s best to pick one font for
  4952. code at the beginning of your programming career and stick with it.
  4953.  
  4954.  
  4955.  
  4956.  
  4957.  
  4958.  
  4959.  
  4960.  
  4961.  
  4962.  
  4963.  
  4964. §    Shift Left / Right
  4965. Shift Left and Shift Right will shift one or more entire lines left
  4966. or right by a tab stop, allowing you to repair or alter the relative
  4967. indentation of your code or text. For simplicity, you should select
  4968. one or more entire lines before calling these commands. They are
  4969. undoable.
  4970.  
  4971.  
  4972.  
  4973.  
  4974.  
  4975.  
  4976.  
  4977.  
  4978.  
  4979.  
  4980.  
  4981. (the effect of Shift Left on the above selection)
  4982.  
  4983.  
  4984.  
  4985.  
  4986.  
  4987.  
  4988.  
  4989.  
  4990.  
  4991.  
  4992.  
  4993.  
  4994.  
  4995. §    Reformat Selection
  4996. Reformat Selection will rebreak the lines in your selection, but the
  4997. result may not always be an improvement. It is designed to work with
  4998. multiple paragraphs, provided you don’t indent the beginning of the
  4999. first line, and that you separate paragraphs with a blank line.
  5000.  
  5001.  
  5002.  
  5003.  
  5004.  
  5005.  
  5006.  
  5007.  
  5008.  
  5009.  
  5010.  
  5011.  
  5012.  
  5013. (the above after Reformat Selection, with the default settings)
  5014.  
  5015.  
  5016.  
  5017.  
  5018.  
  5019.  
  5020.  
  5021.  
  5022.  
  5023.  
  5024.  
  5025.  
  5026.  
  5027. Reformat Selection doesn’t work well on C code, although it may on
  5028. occasion help to tidy up a complicated “if” statement. It works best
  5029. with one or more paragraphs of text, either an entire comment or part
  5030. of a comment, or paragraphs in a text document.
  5031.  
  5032. Since Reformat Selection is undoable there’s no harm in trying it. The
  5033. maximum selection that can be reformatted at one time is roughly the
  5034. standard Text Edit limit, 32,000 or so characters.
  5035.  
  5036. The specific reformatting that Reformat Selection does is governed by
  5037. the two "Reformat" options in the Options dialog. The default action is
  5038. to rebreak lines with a “ragged right” format and a maximum line
  5039. length of 74 characters, a nice width for printing Monaco 9. In the
  5040. Options dialog (near the bottom) you can alter the maximum number of
  5041. characters per line, and also select a “full justification” look if you
  5042. want to knock people over with your comments. The maximum number
  5043. of characters per line is restricted to a range of 30 to 150.
  5044.  
  5045. §    Syntax coloring
  5046. Color can be applied to comments, strings, and constants inside
  5047. ticks -- if you don’t like the default colors, there are a few
  5048. commands to change them, under the Edit menu.
  5049.  
  5050. Coloring is ON by default for documents in the left and mid panes of your
  5051. project, or documents that would go in those panes if you added
  5052. them to your project. Coloring is OFF by default in all other windows.
  5053.  
  5054. To turn coloring on or off for a particular window, click and hold
  5055. to select from the little popup at bottom left of the window:
  5056.  
  5057.  
  5058.  
  5059.  
  5060.  
  5061.  
  5062.  
  5063.  
  5064.  
  5065. This is a simple implementation of coloring. The goal here was to
  5066. color only those things that might usefully be colored, things that
  5067. don’t immediately catch the eye and yet are of some importance.
  5068. Keywords are not colored; if they don’t immediately catch your eye
  5069. yet, just be patient, with a bit more programming under your belt they
  5070. will.
  5071.  
  5072. Syntax coloring might improve with future versions, but one thing
  5073. you can say about EnterAct’s coloring: it doesn't flicker!
  5074.  
  5075. If you grow bored with merely colored comments, try out the
  5076. "Comment options..." command under the Edit menu.
  5077.  
  5078. §    Graphic nesting display
  5079. Hold down the <Option> AND <Command> keys with a source file
  5080. frontmost and vertical lines will appear showing the scope of
  5081. each statement block (ie anything inside {} curly braces). It’s
  5082. OK to scroll with these keys down, but you should release them
  5083. before further editing (I think).
  5084.  
  5085. §    Arrow keys for moving around
  5086. The up down left right arrow keys will move your cursor by one
  5087. character or line. If you hold down the <Option> or <Command> key an
  5088. arrow key will take you all the way in the appropriate direction.
  5089. <command><up arrow> and <command><down arrow> are especially
  5090. useful for taking you to the top or bottom of your document.
  5091.  
  5092.  
  5093. §    Illustrating your text
  5094. As you can see from this manual, there is a way to put PICT's in a
  5095. text document. You can place dialog and screen snapshots,
  5096. structure mockups, flowcharts, state machines, in short, any old
  5097. PICT, into your spec, design, and test documents, even into your
  5098. code files (EnterAct’s style of illustration goes unnoticed by
  5099. compilers, PROVIDED you place the picture inside a /*comment*/).
  5100.  
  5101. EnterAct's illustration capabilities are two in number: paste,
  5102. by dragging a PICT in from another application; and delete, by
  5103. "swiping" a PICT. Both of these are undoable.
  5104.  
  5105. To Paste a PICT into a document: drag & drop it from another
  5106. application (such as the Scrapbook). Note EnterAct cannot serve
  5107. as the source for your PICT, only as the destination.
  5108.  
  5109. To delete a PICT: "swipe" a small text selection within the PICT,
  5110. to produce a dialog that asks if you want to delete the PICT: click OK.
  5111.  
  5112.  
  5113.  
  5114.  
  5115.  
  5116. "Swipe"? That means do a fast mouse-down drag mouse-up. Beat
  5117. your double-click time while selecting a blank line or three. Or if
  5118. you prefer something more elegant, you can click on one line within
  5119. the PICT and then <shift>click at your leisure on a different line.
  5120.  
  5121. Pasting and deletion of PICTs are undoable operations. For a Paste,
  5122. the undo item will refer to a Drag&Drop Paste, and for a delete of
  5123. a PICT the undo menu item refers to a "Clear".
  5124.  
  5125. PICTs are not recorded in your activity log. If you really need persistent
  5126. undo for PICTs, please contact your author at the address at top of this
  5127. manual. Be persuasive, because it wouldn't be easy.
  5128.  
  5129. The position of each PICT is marked in the text by a
  5130. <return><option-space> pair, and "blank" space is opened up for
  5131. the PICT with a series of <return>s. Pasting or deleting a PICT makes
  5132. a permanent change to the resource fork of your document (where the
  5133. PICTs are kept) but the inserted text for the PICT position is not
  5134. saved for you. To avoid surprises, Save after every Paste or delete
  5135. of a picture.
  5136.  
  5137. You can Paste up to 400 PICTs into one EnterAct document.
  5138.  
  5139. PICTs can also be manually inserted by using a combination of a
  5140. resource editor and text editing, as explained next. However, using
  5141. EnterAct's Paste is far more convenient.
  5142.  
  5143. (PLEASE NOTE the following "manual" approach is no longer practical,
  5144. and is preserved here for information purposes only. This is because
  5145. EnterAct now always renumbers your PICTs when you use the above
  5146. paste/delete approach, and uses the sequence 1,000, 1,001...1,400
  5147. without any gaps. This is "Teach Text" compatible, but makes any
  5148. manual insertion of PICTs impossibly tedious. You win some, you
  5149. lose some.)
  5150.  
  5151. Illustrations come in two parts: PICT resources, placed in the resource
  5152. fork of your document using ResEdit or equivalent; and “picture
  5153. markers” in the text of your document, each consisting of a <Return>
  5154. followed immediately by an <Option><space>.
  5155.  
  5156. If you have more than one illustration in a document, the PICT’s should
  5157. be given ID numbers in the same sequence as they are to appear in your
  5158. document. The numbers should be between 128 and 32,767, and if you
  5159. anticipate coming back later to insert new pictures between old ones
  5160. you should space the numbers out a bit, using for example the sequence
  5161. 1,000, 1,100, 1,200.... All PICT’s should be made purgeable, as
  5162. EnterAct does not insist on keeping the PICT’s in memory. In ResEdit,
  5163. you can mark the PICT as purgeable at the same time as you set the ID
  5164. number, using “Get Info...” with the PICT selected.
  5165.  
  5166. For each PICT you wish displayed, you’ll need a <Return>  
  5167. <Option><space> pair at the position where you wish the illustration
  5168. to appear. The simplest approach is to first use ResEdit to install
  5169. your PICT’s in the document, then open the document using EnterAct and
  5170. insert an <Option><space> at the beginning of the line where you want
  5171. the first picture to appear. As you type the <Option><space>, the
  5172. picture will begin to appear—you should then type enough <Return>’s
  5173. to open up blank lines for the picture to occupy, so that it doesn’t
  5174. overlap any following text (however, you may certainly overlap picture
  5175. and text if you want). If you need to see the picture fully redrawn
  5176. while doing this, click in the up or down arrow of the vertical scroll
  5177. bar. Repeat for any following pictures.
  5178.  
  5179. To sum up, the PICT’s in the resource fork of your document should have
  5180. ID numbers that are in the same order as you want them displayed; for
  5181. each picture there should be a <Return> <Option><space> followed by
  5182. enough blank lines to make room for the picture.
  5183.  
  5184. To insert a PICT between two existing PICT’s, give it an ID number
  5185. between the numbers for the flanking PICT’s when you paste it in with
  5186. ResEdit, and put the “picture marker” of course between the flanking
  5187. markers.
  5188.  
  5189. Note that if you add PICTs using a resource editor and then later use
  5190. EnterAct to Paste a PICT into the same document, your PICTs will
  5191. be renumbered automatically using the sequence 1,001, 1,001,
  5192. 1,002... up to 1,400 without gaps.
  5193.  
  5194. If your pictures end up displayed in the wrong order, you can be sure
  5195. that their ID numbers are not in the correct order. A missing picture
  5196. means that either the PICT or the <Return> <Option><space> for it is
  5197. missing. A picture can be moved around between two flanking pictures
  5198. just by cutting and pasting the picture marker, but to change the order
  5199. of pictures you will have to change the PICT ID numbers to the sequence
  5200. you want. Excess PICT’s won’t be displayed until you enter a picture
  5201. marker, and excess markers don’t hurt, but may be triggered
  5202. unexpectedly if you add a PICT at the end of your file.
  5203.  
  5204. A file with two PICT illustrations that have been pasted in
  5205. using ResEdit:
  5206.  
  5207.  
  5208.  
  5209.  
  5210.  
  5211.  
  5212.  
  5213.  
  5214.  
  5215.  
  5216.  
  5217.  
  5218.  
  5219.  
  5220. The "Activities" PICT in "EnterAct Log": the small black rectangle is
  5221. the <Option><space> that marks the picture insert position (shown
  5222. selected). Several <Return>'s follow, to open up enough room for the
  5223. picture.
  5224.  
  5225.  
  5226.  
  5227.  
  5228.  
  5229.  
  5230.  
  5231.  
  5232.  
  5233.  
  5234.  
  5235.  
  5236.  
  5237.  
  5238.  
  5239.  
  5240.  
  5241. For a whopping big example, examine this document and its resources.
  5242.  
  5243.  
  5244. -    -    -    -    -    -    -    -    -    -    -    -
  5245. Balance
  5246. -    -    -    -    -    -    -    -    -    -    -    -
  5247. NOTE you can also Balance a delimiter by double-clicking on it.
  5248.  
  5249. §    Checks everything
  5250. ...except those angular brackets that you find only in
  5251. ____
  5252.         #include <SystemHeader.h>.
  5253. ____
  5254. The full list is (), [], {}, /* */, " ", and ' '.
  5255.  
  5256. Balance will also detect nested comments and any single
  5257. improperly–formed comment start or end. Two improper comment
  5258. delimiters in a row (improper start followed by improper end, or vice
  5259. versa) will not be detected, but that’s a one–in–a–million case that
  5260. you’ll probably never see.
  5261.  
  5262. Because Balance detects nested comments, it will signal an error if
  5263. you use a comment start or end within a comment (nested comment starts
  5264. are excepted if you deselect the “Detect nested comment starts” option
  5265. in the Options dialog)—see “Nested and bad comments” below. 
  5266.  
  5267. For strings in double quotes " ", the line continuation character '\'
  5268. must be the last character on the line if the string is continued to
  5269. the next line:
  5270. ____
  5271.     "This string is \<Return>
  5272.     properly continued."
  5273.     "This string will trigger<Return>
  5274.     a Balance error."
  5275.     "So will \<space><Return>
  5276.     this string, due to the space before Return."
  5277. ____
  5278. Balance will behave in different ways depending on where you are in
  5279. the code. To Balance an entire file, select an insertion point at the
  5280. very top of the file (<Option><up arrow> will take you there). To
  5281. Balance a specific delimiter, either click just to the left of it or
  5282. select the delimiter (note for comment starts and ends this means both
  5283. characters). 
  5284.  
  5285. Given an insertion point, Balance will first look to the immediate
  5286. right for a delimiter that wants balancing, and then to the immediate
  5287. left. When several delimiters are side by side, you can avoid having
  5288. to remember this by just selecting the delimiter you wish balanced.
  5289. Clicking between the characters of a comment start or end also counts
  5290. as a “hint” to find the other end. 
  5291.  
  5292. If your range of characters selected doesn’t consist of just a single
  5293. delimiter, or if your insertion point is not right next to a delimiter,
  5294. then Balance will try to find the smallest enclosing pair of
  5295. delimiters. Your selection range will expand to the next enclosing pair
  5296. as you repeat the Balance command.
  5297.  
  5298.  
  5299. §    Shows the error location
  5300. Any unmatched or mismatched delimiter will be selected and shown. In
  5301. the case of mismatched delimiters, you can switch between the two
  5302. delimiters by selecting Balance again. If the delimiter is an “orphan”,
  5303. the second Balance will just produce a beep, since there’s no other
  5304. end to show.
  5305.  
  5306.  
  5307.  
  5308.  
  5309.  
  5310.  
  5311.  
  5312.  
  5313.  
  5314.  
  5315.  
  5316.  
  5317.  
  5318. (if there’s a mismatch, a second Balance will show the other end)
  5319.  
  5320.  
  5321.  
  5322.  
  5323.  
  5324.  
  5325.  
  5326.  
  5327.  
  5328.  
  5329.  
  5330.  
  5331.  
  5332. §    Balancing a file
  5333. Given an insertion point at the top of a file, Balance will balance
  5334. the entire file. If you hear a beep and the cursor does not move from
  5335. the top of the file, that means the entire file is balanced. Either
  5336. Go Top or <Option><up arrow> will take you to the top of a file.
  5337.  
  5338. Balancing a file by starting from the top will always work correctly.
  5339. You can also Balance a file by starting at the very bottom, but this
  5340. may not work properly if the file contains any assembly–language
  5341. sections (see “The asm problem” at the end of this chapter).
  5342.  
  5343.  
  5344. §    Balancing a specific delimiter
  5345. Balance looks for a “hint” from you, as indicated by your insertion
  5346. point or selection, before going ahead. As mentioned above, you can
  5347. Balance one specific delimiter by selecting it just before the balance,
  5348. or by selecting an insertion point just to the left of it. If the
  5349. delimiter is not next to another delimiter, you can click on either
  5350. side of it. With comments and strings it is best to start the Balance
  5351. off with a “hint”, that is, select one end of the comment or string
  5352. or click next to one end, since if you start in the middle of a comment
  5353. or string the text will be checked as strictly as possible, without
  5354. allowance for it being within a comment or string.
  5355.  
  5356.  
  5357.  
  5358.  
  5359.  
  5360.  
  5361.  
  5362.  
  5363.  
  5364. (Balance will take the selected ')' as a hint)
  5365.  
  5366.  
  5367.  
  5368.  
  5369.  
  5370.  
  5371.  
  5372.  
  5373.  
  5374.  
  5375.  
  5376. §    Nested and bad comments
  5377. Balance will detect all nested comments, and any comment that has one
  5378. end missing. In the case of a comment with one end missing , you will
  5379. be shown a “good” end in the vicinity of the bad one, and you’ll have
  5380. to deduce on your own where the other end should be. Comment errors
  5381. can sometimes be subtle and difficult to see, such as a space between
  5382. the '*' and the '/'.
  5383.  
  5384. (The first comment shown here is not ended properly. Balance detects
  5385. the start of the second comment as an attempt to nest comments, and
  5386. shows it as an error.)
  5387.  
  5388.  
  5389.  
  5390.  
  5391.  
  5392.  
  5393.  
  5394. (An immediate second Balance will show that the lower comment
  5395. is correct, implying that the error was in the comment just above.)
  5396.  
  5397.  
  5398.  
  5399.  
  5400.  
  5401.  
  5402.  
  5403.  
  5404. If you leave the “Detect nested comment starts” check box checked in
  5405. the Options dialog, then any files in your EnterAct project are
  5406. guaranteed to be free of these comment errors after a successful
  5407. Update Dictionary, since the dictionary–builder checks comments
  5408. thoroughly.
  5409.  
  5410. The one price to be paid for EnterAct’s improved comment checking is
  5411. that you should not use a comment start or end within a comment. Such
  5412. things as
  5413.     /*.../*...*/
  5414. and
  5415.     /*...*/...*/
  5416. will be treated as errors, both by the Balance command and by the
  5417. dictionary–builder. If you do need to use a comment start or end within
  5418. a comment, the general cure is to place some character between the star
  5419. and the slash. A space will do, or you could be pedantic and place each
  5420. character in separate single quotes, for example instead of /* use / *
  5421. or '/''*'.
  5422.  
  5423. Well, OK—some of you deliberately double up your comment starts to save
  5424. on typing. If you do this, select the Options command under the Edit
  5425. menu and uncheck the “Detect nested comment starts” check box. This
  5426. affects the dictionary builder also.
  5427.  
  5428.  
  5429.  
  5430.  
  5431.  
  5432.  
  5433.  
  5434.  
  5435.  
  5436.  
  5437. §    Starting in the middle
  5438. If your selection doesn’t indicate a hint, Balance first looks
  5439. backwards in your file for a delimiter; when it finds one, it then
  5440. looks forwards for another delimiter, hoping to match them up. Of
  5441. course, if you supply an opening delimiter as a “hint”, or start from
  5442. the top of the file, Balance will proceed in the forward direction
  5443. immediately.
  5444.  
  5445. On rare occasions you may wish to balance the contents of a comment
  5446. or string as though it were code, and not just text. To do this, click
  5447. or select a range of characters within the comment or string, away from
  5448. either end. Balance will then check all delimiters as it works
  5449. outwards, until it encounters one end of the comment or string and
  5450. “realizes” that it has been fooled. 
  5451.  
  5452. By the way, EnterAct also accepts “C++” style comments, as in
  5453. ____
  5454.     //comment beginning with two slashes, to end of line
  5455. ____
  5456. but only to the extent of skipping over the contents when balancing.
  5457. If you start the Balance within this sort of comment it may just
  5458. beep at you. 
  5459.  
  5460. Before Balancing:
  5461.  
  5462.  
  5463.  
  5464.  
  5465.  
  5466.  
  5467.  
  5468.  
  5469.  
  5470.  
  5471.  
  5472. After the first Balance:
  5473.  
  5474.  
  5475.  
  5476.  
  5477.  
  5478.  
  5479.  
  5480.  
  5481.  
  5482.  
  5483.  
  5484. After a second Balance:
  5485.  
  5486.  
  5487.  
  5488.  
  5489.  
  5490.  
  5491.  
  5492.  
  5493.  
  5494.  
  5495.  
  5496.  
  5497. §    The asm problem
  5498. If Balance runs into an “asm {...}” construction while looking
  5499. backwards through your code, it just plain won’t know that it’s inside
  5500. an asm. Any error you’re shown in this one circumstance is not to be
  5501. trusted, since it will almost certainly be due to a delimiter inside
  5502. an assembly–language comment (they start with a semicolon). 
  5503.  
  5504. When you balance a file from the top, all asm constructions will be
  5505. handled properly. The dictionary–builder, by the way, also handles
  5506. asm’s properly. Be warned that in other cases if you ask Balance to
  5507. run backwards through a block of assembly language it will hiccup if
  5508. it runs into a delimiter within an assembly–language comment. This is
  5509. a bug, but I haven’t found a cure that wouldn’t slow balancing down
  5510. to a crawl. 
  5511.  
  5512. Because of this problem it is best to always balance an entire file
  5513. by starting from the top rather than from the bottom, unless you’re
  5514. sure that the file contains no assembly language.
  5515.  
  5516. To Balance an assembly–language block, or a function containing
  5517. assembly language, select or click next to the opening curly brace '{'
  5518. at the top rather than the closing curly brace.
  5519.  
  5520. Otherwise, this will only be a problem if you’re balancing inside a
  5521. function that contains a block of assembly language. Then, you should
  5522. select opening delimiters rather than closing delimiters before
  5523. balancing. 
  5524.  
  5525.  
  5526. -    -    -    -    -    -    -    -    -    -    -    -
  5527. Search
  5528. -    -    -    -    -    -    -    -    -    -    -    -
  5529.  
  5530.  
  5531.  
  5532.  
  5533.  
  5534.  
  5535.  
  5536.  
  5537.  
  5538.  
  5539.  
  5540. (both Find and Replace strings are limited to 255 characters)
  5541.  
  5542. §    Introduction
  5543. Single and multi–file searches in EnterAct are controlled by a modeless
  5544. Find dialog. The one important novelty is that you fine–tune your
  5545. multi–file selection by holding down the <Option> key and dragging over
  5546. the files in the project window (bullets • appear beside each file
  5547. included in the search). Your multi-file selection can also be used
  5548. to remove files from a project, or used by a hAWK program as a list
  5549. of files to take input from.
  5550.  
  5551. Replace, Replace and Find Again, and Replace All are all undoable.
  5552. The commands Find, Find Again, and Enter Selection all function when
  5553. the project window is in front, and the “find” commands also function
  5554. when the project window is just behind the Find dialog. Find commands
  5555. will search the currently active pane, useful if you are trying to spot
  5556. one file in a long list, or pick out files with similar names. Enter
  5557. Selection will enter the currently-selected file name in the Find
  5558. dialog.
  5559.  
  5560.  
  5561. §    Find is modeless
  5562. This requires a few minor adjustments in the way you search. 
  5563. There is no Cancel button in the Find dialog box—it has a Close box
  5564. instead. 
  5565.  
  5566. While the Find dialog is the front window, search commands that deal
  5567. with single files will apply to the window just beneath the Find
  5568. dialog. Replace All is excepted because it can cause multiple changes,
  5569. so to use this command you must have the text window in front.
  5570.  
  5571. Find and Find Again also function if the Find dialog is in front of the
  5572. project window, searching the current pane as though it were a text
  5573. list of file names (actually, that’s what it is…).
  5574.  
  5575. The “Find” button is the equivalent of the Find Again command. When
  5576. you click the Find button or select Find Again, the window just beneath
  5577. the Find dialog will be brought to the front, and the next instance
  5578. of your find string shown. The Find dialog will stay on–screen, moving
  5579. just behind the window being searched, so to find again you can if you
  5580. wish leave your mouse stationed over the Find button and double–click
  5581. (not a true double–click, the first click brings the Find dialog to
  5582. the front, and the second does the Find Again).
  5583.  
  5584. Buttons for multi–file searching are incorporated directly in the Find
  5585. dialog (more on this in “Multi-file searches” below). To modify your
  5586. multi–file search selection of files, hold down the <Option> key and
  5587. drag over the file names in the project window. You’ll see the
  5588. “eyeball” cursor while doing this.
  5589.  
  5590.  
  5591.  
  5592.  
  5593.  
  5594.  
  5595.  
  5596.  
  5597.  
  5598.  
  5599.  
  5600.  
  5601.  
  5602.  
  5603.  
  5604.  
  5605.  
  5606. §    Find options
  5607. Select “Match Words” if  you don’t wish to match a longer string that
  5608. contains your find string in a form that makes a different word. For
  5609. example, the string “Open” will also match “Opening”, “Opened” etc
  5610. unless you select the “Match Words” option in the Find dialog.
  5611.  
  5612. A special case: if your string begins or ends with punctuation, such
  5613. as “->structMember” then leave “Match Words” unselected.
  5614.  
  5615. “Wrap Around” will continue your search from the beginning of your
  5616. document if the next Find runs off the bottom end of it. 
  5617.  
  5618. This also affects the Replace commands: to Replace All instances in
  5619. a file, it’s simplest to select an insertion point at the top of the
  5620. file beforehand; to Replace All instances below a certain point, click
  5621. just before the position where you want the replacing to start, and
  5622. leave “Wrap Around” deselected.
  5623.  
  5624. “Ignore Case” treats upper and lower–case letters as the same.
  5625.  
  5626. §    Batch Find options
  5627. If you click the "Batch" check box, your multi-file search will be
  5628. done all at once, and the results presented in a text window
  5629. (file name, line number, and the full line where found). To view
  5630. a particular found instance in the original file, click on the result
  5631. line and use "Go to...".
  5632.  
  5633. For Batch finds, if you select "List markers" then the line that lists
  5634. a particular location will include the containing function name.
  5635. Here's an example result (results appear in the stdout window):
  5636. ____
  5637. Batch find results for: «nextName»
  5638. --------------------------------------------
  5639. «CEDAR_AutoLook.c»  3513 |ResolveOneLink| Boolean ResolveOneLink(StringPtr t1, short nextName, Handle *hTextP, long *primaryLinkP)
  5640. «CEDAR_AutoLook.c»  3524 |ResolveOneLink|         // Note nameLink0 is set only if nextName == 0.
  5641. «CEDAR_AutoLook.c»  3841 |GetSomeTypeNameForMember| /* typeLink1 is the index of a type name, nextName is sNameChain index
  5642. «CEDAR_AutoLook.c»  3843 |GetSomeTypeNameForMember| for nextName (and if nextName is 0 set nameLink0), return TRUE;
  5643. ____
  5644. Once again, to jump to a particular instance, click on the line that
  5645. contains the file location and use "Go to...".
  5646.  
  5647. Please see "§    Skip '-' : excluding files from a search" below if you wish
  5648. to skip certain files easily while searching or carrying out some
  5649. other multi-file operation.
  5650.  
  5651. §    Dual Batch Find
  5652. Translated into English, the dialog that appears when you click the
  5653. Dual Batch Find button in the Find dialog lets you do "Find two
  5654. strings wihin a certain number of lines or characters of each
  5655. other". This is a multi-file operation, that is it looks in files
  5656. that you've bulleted for multi-file searches, and it's a Batch
  5657. operation in that it presents its result in the stdout window.
  5658.  
  5659. To find the two strings on the same line, enter a zero for the
  5660. number of lines. Zero characters means the two strings must
  5661. be found right together with no characters in between.
  5662.  
  5663. Dual Batch Find is a sort of mini-grep for dummies (like me).
  5664. hAWK can perform full grep searches if you need the extra power
  5665. (but in practice I've found that setting up grep searches is too
  5666. error-prone for casual use).
  5667.  
  5668. Both strings that you enter in the Dual Batch Find dialog obey
  5669. the "Match Words" and "Ignore Case" options that you select
  5670. in the main Find dialog.
  5671.  
  5672. §    <Tab> and <Return>
  5673. A plain <Tab> will jump your cursor from one edit field to the other,
  5674. and a plain <Return> is the equivalent of the “Find” button. To enter
  5675. a <Tab> or <Return> in either the find or the replace text, hold down
  5676. the <Command> key while typing the character.
  5677.  
  5678.  
  5679. §    Find again
  5680. This menu command is the equivalent of the “Find” button in the Find
  5681. dialog, and finds the next instance of your find string in accordance
  5682. with your Find options (see above). Find Again searches the front
  5683. window, or, if the Find dialog is in front, the window just behind the
  5684. Find dialog.
  5685.  
  5686. Find Again also works with the project window, allowing you to search
  5687. for part of a file name in a long list of files. It searches the active
  5688. pane only (the one with filled-in scroll bars).
  5689.  
  5690.  
  5691. §    Enter selection
  5692. Enter Selection will replace your current find string with whatever
  5693. text you have selected. It works with any text window including lookup
  5694. windows, and also the project window (in case you wish to search for
  5695. a file name). If your Find dialog is on–screen, you will see the new
  5696. find string in the dialog.
  5697.  
  5698.  
  5699. §    Recent finds are remembered
  5700. Your most–recent find strings will be stored in the popup “Find:” menu
  5701. at top–left of the Find dialog. Selecting an item from the popup will
  5702. copy it to your find string box.
  5703.  
  5704. Two minor limitations apply: find strings containing <Return>s or more
  5705. than 48 characters will not be remembered by the popup menu.
  5706.  
  5707.  
  5708.  
  5709.  
  5710.  
  5711.  
  5712.  
  5713.  
  5714.  
  5715.  
  5716.  
  5717.  
  5718.  
  5719.  
  5720.  
  5721.  
  5722.  
  5723.  
  5724.  
  5725.  
  5726.  
  5727.  
  5728.  
  5729.  
  5730. §    Replace
  5731. Replace can be thought of as a Paste for short strings (up to 255
  5732. characters). The replacement text is taken from the replace string in
  5733. the Find dialog. No checking is done to see if the selection that will
  5734. be replaced corresponds to your find string, so the replacement string
  5735. can in effect be used as a second (small) clipboard. To set up a choice
  5736. between two “Paste” alternatives, enter one selection into the
  5737. replacement string in the Find dialog, and then Copy the other
  5738. selection. Then Paste or Replace in your document as appropriate.
  5739.  
  5740. If the Find dialog is in front, Replace will affect the window just
  5741. behind the Find dialog.
  5742.  
  5743. Replace is undoable provided the window in which the Replace was done
  5744. is in front, and provided you don’t perform some other undoable action
  5745. before undoing.
  5746.  
  5747.  
  5748. §    Replace and Find Again
  5749. This command is the exact equivalent of Replace followed by Find Again,
  5750. and is undoable.
  5751.  
  5752.  
  5753. §    Replace All
  5754. Unlike other search commands, Replace All cannot be called when the
  5755. Find dialog is in front—you must specifically bring frontmost the
  5756. window in which you wish to use Replace All. This small awkwardness
  5757. is an attempt to remind you that Replace All is the one editing command
  5758. that can make a real mess of your document. However, it is undoable—as
  5759. with other undoable operations, you need only have the correct window
  5760. in front before undoing.
  5761.  
  5762. If you have selected the “Wrap Around” option in the Find dialog,
  5763. Replace All will indeed replace all instances of the find string with
  5764. the replace string throughout your document. If “Wrap Around” is not
  5765. checked, replacement will be done only below your current position in
  5766. the text. To prevent a single instance of the find pattern from being
  5767. replaced, select at least the first character of the instance in your
  5768. document just before Replace All (selecting all of it will do).
  5769.  
  5770.  
  5771. §    Multi–file searches
  5772. Any file in your project can be added to a list of files to be
  5773. searched. Files that are included in a multi–file search will have a
  5774. bullet • just to the left of the name in the project window.
  5775.  
  5776. “Coarse” setup of the multi–file search is done with the small buttons
  5777. in the lower–right of the Find dialog. These allow you to select all
  5778. files of a particular type—.c, ".h", <.h>, or plain text. The “None”
  5779. button will clear the multi–file search selection, and the “All” button
  5780. will add all of your project text files to the list. A counter in the
  5781. Find dialog shows how many files will be searched.
  5782.  
  5783. To “fine–tune” your list of files to be searched, hold down the
  5784. <Option> key and click on or drag over the files in the project window.
  5785. The cursor will change to an eye, and bullets beside the file names
  5786. will appear or disappear as you drag up and down over the files. There
  5787. is an illustration of this near the beginning of this chapter.
  5788.  
  5789. Once your files are selected (and you’ve entered what you want found
  5790. in the find string in the Find dialog) select Find In Next File or
  5791. click the equivalent button in the Find dialog. As the search
  5792. progresses, you will see the bullets beside file names in the project
  5793. window disappear as each file is searched. The counter in the Find
  5794. dialog will also count down the number of files remaining. If an open
  5795. file is searched by Find In Next File, it will be searched from the
  5796. beginning of the file. When an instance is found, Find Again will
  5797. locate other instances in the same file. To continue the multi–file
  5798. search with the next  file, select Find In Next File again.When all
  5799. files have been searched, you’ll hear a beep, the counter in the Find
  5800. dialog will read zero, and all bullets will be gone from the project
  5801. window.
  5802. Even if you don’t find anything, it puts on a nice show.
  5803.  
  5804. A <Command><period> will interrupt a multi–file search, and also clear
  5805. the list of files to be searched.
  5806.  
  5807. To generate a list of all instances of your search string, click
  5808. the "Batch" check box before doing your Find In Next File. Results
  5809. of the search will be shown to you in the "$tempStdOut" window
  5810. in the format «file name» line-number line-where-found, and
  5811. to view a particular instance in its original context click on the
  5812. line and use "Go to...".
  5813.  
  5814. Note that the "Find in Next File" button changes to read "Batch Find"
  5815. if you click the Batch checkbox in the Find dialog, and the corresponding
  5816. menu item under the Search menu changes as well.
  5817.  
  5818. By the way, your list of bulleted files in the project window can also
  5819. be used to remove those files from your project (see “Remove •'d Files”
  5820. in the “Projects” chapter), and used by a hAWK program as a list of
  5821. input files (see Appendix 2, and the hAWK User’s Manual on disk 2).
  5822.  
  5823.  
  5824.  
  5825.  
  5826.  
  5827.  
  5828.  
  5829.  
  5830.  
  5831.  
  5832.  
  5833.  
  5834.  
  5835.  
  5836.  
  5837. §    Skip '-' : excluding files from a search
  5838. In the Find dialog, the "Skip '-'" checkbox lets you exclude project files
  5839. that are marked with a dash '-' when carrying out a multi-file operation
  5840. such as searching. These dashes are primarily used to exclude files
  5841. from a dictionary build, and are placed by holding down the <Command>
  5842. key and clicking on the file's name in the project window. But you
  5843. may also wish to skip over these files when multi-file searching: if
  5844. so, you should turn this checkbox on in the Find dialog before
  5845. carrying out the search. Note if the "Skip '-'" option is on, then files
  5846. with a '-' beside them will not be passed to hAWK in your multi-file
  5847. selection, and they will not be removed from your project when
  5848. you pick "Remove •'d Files", whether or not they have bullets beside
  5849. them. Neither will they be selected or deselected for searching if
  5850. you click on the "All" or "None" buttons in the Find dialog.
  5851.  
  5852. If you have the "Skip '-'" checkbox turned on, then when you fine-tune
  5853. your multi-file selection by <Option>clicking in the project window
  5854. you will not be able to place bullets beside files that have a dash '-'
  5855. beside them. But note that "Skip '-'" takes precedence, so if you
  5856. put bullets beside files that have dashes and then turn on "Skip '-'",
  5857. those dashed files will not be included in multi-file operations.
  5858. At any time, the "Files to search:" number in the Find dialog
  5859. accurately shows the total number of files that will be searched,
  5860. so if "Skip '-'" is on then dashed files will not be included in the total.
  5861.  
  5862. To run a multi-file operation (such as the hAWK program
  5863. "$EchoFullPathNames", or a Batch Find) on just files that
  5864. are not marked with a '-':
  5865.     • select "Skip '-'"
  5866.     • mark the files with bullets (eg by clicking the All ".c" button
  5867.         or by holding down the <Option> key and clicking on project file
  5868.         names)
  5869.     • run the multi-file operation.
  5870.  
  5871. To run a multi-file operation on all EXCLUDED files, ie those
  5872. that are marked with a '-':
  5873.     • deselect "Skip '-'"
  5874.     • click the "All" button in the Find dialog
  5875.     • select "Skip '-'"
  5876.     • click the "None" button in the Find dialog
  5877.         (this will leave bullets beside files marked with a '-')
  5878.     • deselect "Skip '-'" again so the bulleted files won't be ignored
  5879.     • run the multi-file operation.
  5880.  
  5881. §    THINK Find commands
  5882. Located under the Search menu near the bottom, three commands allow
  5883. you to make use of the THINK Project Manager's "Find" results from
  5884. within EnterAct. To use these commands, you must use THINK C 6 or
  5885. later, and set up EnterAct as the Project Manager's editor as described
  5886. in Appendix 4 here.
  5887.  
  5888. After completing a "batch" find in THINK C, you can use the THINK
  5889. Find Again and THINK Find Previous commands to step through the
  5890. results. These two commands work only with the results of a
  5891. batch find.
  5892.  
  5893. To start or continue a multi-file search using the THINK Project
  5894. Manager's multi-file search rather than EnterAct's, use the
  5895. THINK Find In Next File commands after setting up the (non-batch)
  5896. search in the THINK Project Manager. Note this means you can perform
  5897. and even alternate between two separate multi-file searches, THINK's
  5898. and EnterAct's.
  5899.  
  5900. Find in THINK Reference does the same thing as the command of the
  5901. same name in the THINK Project Manager's editor: it passes your
  5902. currently-selected text over to THINK Reference, where you'll be
  5903. shown any entry it has on the name in question. Note this works only
  5904. with THINK Reference version 2 or later.
  5905.  
  5906. To use EnterAct's "Find in THINK Reference" command under any
  5907. circumstances, create a folder named "Tools" or "(Tools)" next
  5908. to EnterAct and drop an alias of Think Reference in it.
  5909.  
  5910. Find in Toolbox Assistant is much the same, just drop an
  5911. alias of QuickView in your Tools folder.
  5912.  
  5913. -    -    -    -    -    -    -    -    -    -    -    -
  5914. “Go” commands
  5915. -    -    -    -    -    -    -    -    -    -    -    -
  5916. Of the four “Go” commands under the Search menu, the most important
  5917. is the “Go to” command. This command allows you to jump to any marked
  5918. position in any project file, and since the marker position is
  5919. maintained as you edit, so is your ability to jump to it. The standard
  5920. suite of “go” capabilities is also available.
  5921.  
  5922.  
  5923. §    Go to Top/Bottom
  5924. The Go to Top and Go to Bottom menu commands do the same thing as
  5925. <command><up arrow> and <command><down arrow>, namely take you to
  5926. the top or bottom of your text window. They also function in the
  5927. project window.
  5928.  
  5929.  
  5930. §    Go to
  5931. The “Go to” command allows you to jump to a fixed position or a marker,
  5932. based on the text you have selected in your front window. The position
  5933. or marker can be in any project file.
  5934.  
  5935. For example, you can jump to a specific marker in a specific project
  5936. file with “Go to”. And there is an easy way to generate the file name
  5937. and marker name text (pick the marker from its popup marker menu while
  5938. holding down the <Shift> key), as explained in “Going to markers” a
  5939. couple of pages ahead. A typical link of this form in your code might
  5940. look like
  5941. ____
  5942.     /* See «MyProject Log» «Conversation with J.B. re New Features» */
  5943. ____
  5944. where the project file is “MyProject Log” and the marker name is inside
  5945. the second set of Euorpean quotes «». You could jump to the marker in
  5946. your “MyProject Log” file by clicking anywhere on the line mentioning
  5947. the file and marker and then selecting “Go to”. Selecting the
  5948. entire file name and marker name including the surrounding «» quotes
  5949. would also work. Since markers are maintained by most editors
  5950. (EnterAct, THINK C, and MPW for example), links of this form will also
  5951. be maintained as long as the marker exists and the file is in your
  5952. current project.
  5953.  
  5954. If both file name and marker name are in «» quotes, then both file
  5955. and marker name can be highly abbreviated, eg
  5956. ____
  5957.     /* See «Log»«J.B. News» */
  5958. ____
  5959. —as with regular lookup, your spelling just needs to be
  5960. “distinctively close”, in terms of runs of matching characters
  5961. when comparing against file and marker names in your project.
  5962.  
  5963. “Go to” also works with file names or marker names alone, or with line
  5964. and character positions in a file, or with file name followed by line
  5965. and character position. And it also accepts full path names.
  5966.  
  5967. The following terms are used below to help summarize selection
  5968. possibilities:
  5969.     • file_name:         the name of a project file, optionally enclosed in
  5970.     European-style quotes, ie «». Your selection will be extended to
  5971.     include any trailing file extension (such as “.c” or “.NOTES”),
  5972.     provided your basic selection is not by itself the name of a project
  5973.     file. This could also be a full path name.
  5974.     • marker_name:     the name of a marker in a project file, optionally
  5975.     enclosed in European style quotes «». Note the name of the marker
  5976.     should be specified, not the text (if any) that is selected when you
  5977.     jump to the mark.
  5978.     • text_position:     line number, optionally followed by character position
  5979.     on the line, for example 123 6 to specify the 123rd line in a file,
  5980.     just before the 6th character. The first line in a file is line 1, and
  5981.     the insertion point before the first character on a line is character
  5982.     position 1.
  5983.     • other_text:     by itself, text that is none of the above; following a
  5984.     file_name, text that is not a marker_name or text_position.
  5985.     • insertion_point: an empty selection.
  5986.  
  5987. “Go to” acts on selections in the following ways:
  5988.     • file_name     :            open the project file, or just bring it to the front if
  5989.                                     open
  5990.     • marker_name :        equivalent to selecting the marker from the
  5991.                                     window’s marker menu
  5992.     • text_position :        go to the position specified
  5993.     • file_name marker_name :     open the project file or bring it to front, and
  5994.                                     go to the marker specified
  5995.     • file_name text_position :     open the project file or bring it to front,
  5996.                                     and go to the position specified
  5997.     • file_name other_text :    open the project file or bring it to front, then
  5998.                                     use “Find” on the other_text in an attempt to
  5999.                                     locate it
  6000.     • other_text :            display a dialog in which to enter a line number
  6001.                                     to jump to.
  6002.     • insertion_point :    if the text of the link is quoted, ie file_name or
  6003.                                     marker_name if present are within «» quotes, then
  6004.                                     clicking anywhere on the line is sufficient to select
  6005.                                     the link for goto purposes. Otherwise, you will be
  6006.                                     shown the line number dialog, as with “other_text”
  6007.  
  6008. Note if both file name and marker name are in «» quotes you can use
  6009. extremely abbreviated versions of the names: the file name just has
  6010. to be "distinctively close" to the name of a project file, likewise
  6011. the marker name to a marker in that file.
  6012.  
  6013. Selections intended for the “Go to” command are called “Go to” selections
  6014. or “Go to” links in this manual. Here are some examples:
  6015.  
  6016.  
  6017. (a file_name link: note selecting the “.h” is optional)
  6018.  
  6019.  
  6020. (file_name in quotes followed by line number and character position
  6021. on line—for “Go to”, any insertion point on the line will do)
  6022.  
  6023.  
  6024.  
  6025. (instead of an insertion point, you can select all of the file_name
  6026. text_position)
  6027.  
  6028.  
  6029.  
  6030. (unquoted version of the same)
  6031.  
  6032.  
  6033.  
  6034. (file_name marker_name: with both in quotes, your selection can be
  6035. an insertion point anywhere on the line, here between the file and
  6036. marker names)
  6037.  
  6038.  
  6039.  
  6040.  
  6041. (without quotes, you must select the entire file_name marker_name)
  6042.  
  6043.  
  6044.  
  6045.  
  6046. (a marker-name link in the document “Proj Interface.DSGN”? Probably.
  6047. But it could also be a file name, or a marker in some other document.
  6048. The context of your current project and front window will determine
  6049. what  «Modifier keys»  is, and where you go to. Note for “Go to”
  6050. purposes, you could also just click in the line rather than selecting.
  6051.  
  6052. The one important restriction on “Go to” is that if you specify a file
  6053. name, the file you are going to must be in your currently open project.
  6054. If it isn’t, you can add it with the Add Files command.
  6055.  
  6056. To resolve ambiguity, file names take precedence over marker names.
  6057. And if you should have a marker name that looks like a text position,
  6058. enclosing it in quotes«» will force treatment as a marker name.
  6059.  
  6060. The file name can be the name of a PICT file, by the way, allowing you
  6061. to use single pictures as popup illustrations. And “Go to” works with
  6062. file names selected in the project window, performing the same as if
  6063. you double-clicked on the file name to open the file.
  6064.  
  6065. Spaces or tabs before, between, or after the components of a “Go to”
  6066. selection will be ignored. Hence the enclosing «» quotes are required
  6067. if a file name or marker  name begins or ends with “white space”.
  6068. Otherwise they’re optional, but quotes do help “Go to” selections to
  6069. stand out quietly from the surrounding text. And if both file name and
  6070. marker names are quoted, clicking anywhere on the line is
  6071. equivalent to selecting both parts for “Go to” purposes, a handy
  6072. shortcut. Quotes are included when you copy a marker name (and file
  6073. name) from a marker menu, as explained in “Going to markers” on the
  6074. next page.
  6075.  
  6076. If you have included a file name in your “Go to” selection but are
  6077. immediately shown the line number dialog instead of the desired file,
  6078. this means you haven’t yet added the file to your project. If you see
  6079. a message that the file couldn’t be found, this means the file has been
  6080. moved, renamed, or deleted since you added it to your project, and the
  6081. solution is to delete the file from your project and re-add it. If a
  6082. line that you go to seems to be the wrong line, this normally just
  6083. means that the file has been edited (lines added or deleted) since the
  6084. line number was specified. And if going to a marker doesn’t work, this
  6085. usually means that the marker has been deleted from the file (note that
  6086. if you delete the actual text marked then you lose the marker, even
  6087. if you immediately undo the delete).
  6088.  
  6089. File-name line-number links are of limited use, since the line numbers
  6090. can quickly become obsolete. Links of this form are however generated
  6091. by EnterAct and by hAWK programs when displaying lists of positions
  6092. (see the next section). File-name marker-name links are better for your
  6093. own use since their locations are maintained for you, and you’ll find
  6094. in the “Going to markers” section below an easy way to generate the
  6095. necessary text for them. And any existing mention of a file name or
  6096. marker name in any of your project documents is now a “Go to” link,
  6097. as you no doubt gathered -- just add the corresponding document to
  6098. your project.
  6099.  
  6100. §    Going to included files
  6101. To jump to the top of an included file such as
  6102. ____
  6103.     #include "thisheader.h"
  6104. ____
  6105. click on the line and select "Go to...".
  6106.  
  6107. Note if you have more than one header file with the same name
  6108. in your project you might not get the right one.
  6109.  
  6110. (To toggle between a source file and its corresponding header,
  6111. such as "File.cp"/"File.h", use <command><tab>.)
  6112.  
  6113. §    Going to text positions
  6114. Text positions compatible with the “Go to” command are displayed by the
  6115. Show Activities command, for example:
  6116. ____
  6117.     ¶60
  6118.     Sat Jan 16, 1993 10:51:48 pm PASTE «hAWK_FilesandClip.c» 390 4
  6119.     =>inserted 50 characters:
  6120.     «if (!dirs && !(fpb->ioFlAttrib & 16)) /* a file */»
  6121.     ¬
  6122. ____
  6123. To see the place where this paste took place, you would select
  6124. “«hAWK_FilesandClip.c» 390 4”, or just click in the line
  6125. somewhere, and then “Go to”. For details, please see the “Show
  6126. Activities” chapter. For now, note that the Show Activities
  6127. command can update the text positions (and even file names) for
  6128. you, to keep them as current as theoretically possible, which is to
  6129. say almost always useful.
  6130.  
  6131. Many hAWK programs generate file-name line-number text that is
  6132. compatible with the “Go to” command. For example, $CompareFiles shows
  6133. document differences in this form, and $XRef generates file name and
  6134. line number listings for C terms in your source code. Several of
  6135. the Index commands under the EnterAct menu also generate line
  6136. numbers.
  6137.  
  6138. Text positions can be used to link documents together, but you’ll
  6139. usually find it better to use marker names instead (see just below).
  6140. The reason is that marker positions are maintained as you edit files,
  6141. whereas line numbers can go out of date quickly.
  6142.  
  6143.  
  6144. §    Going to markers
  6145. The ability to “go to” any marker in any project file means you can
  6146. use a file name followed by a marker name as a true “hyperlink”,
  6147. especially useful for placing references to supporting documentation
  6148. in your source files or other documents.
  6149.  
  6150. To generate the necessary text for establishing a file-name marker-name
  6151. link:
  6152.     •    open the file that contains the marker
  6153.     •    hold down the <Shift> and <Option> keys, and click-and-drag in the
  6154.         window’s title bar to access the popup marker menu; select the marker
  6155.         you want
  6156.     •    the link, in the form «file name» «marker name» , is now on the
  6157.         clipboard, ready for pasting.
  6158.     •    (note <Shift> <Command> will also work when picking from a marker
  6159.         menu)
  6160.  
  6161. EnterAct places «» quotes around both the file name and the marker name.
  6162.  
  6163. To generate file-name marker-name link text for all markers in one or
  6164. more files, use the "Index Marker Names" command under the EnterAct
  6165. menu, as described in the "'Index' commands" chapter.
  6166.  
  6167. With quotes around both the file name and marker name, you can “select”
  6168. a file-name marker-name for “Go to” purposes by clicking anywhere on
  6169. the line if it's the only link on the file, or between the two quoted
  6170. bits of text otherwise. Your selection will be expanded to include the
  6171. quoted file name and marker names when you pick “Go to”. And with
  6172. both file and marker name in «» quotes you can use highly abbreviated,
  6173. even slightly incorrect versions of the names, provided those names
  6174. are distinctively close to the names of a file in your project and a
  6175. marker in that file (in terms of case-sensitive runs of matching
  6176. characters).
  6177.  
  6178.  
  6179.  
  6180.  
  6181.  
  6182.  
  6183.  
  6184.  
  6185.  
  6186.  
  6187.  
  6188.  
  6189.  
  6190.  
  6191.  
  6192.  
  6193.  
  6194.  
  6195.  
  6196.  
  6197.  
  6198.  
  6199.  
  6200.  
  6201.  
  6202.  
  6203.  
  6204.  
  6205. To go to the position referenced by a file-name marker-name link,
  6206. click on the line containing the link text,
  6207. and then issue a “Go to” (see next illustration).
  6208.  
  6209. On the chance that too many new things at once have pushed some old
  6210. things out the bottom of your memory stack, a reminder that to jump
  6211. to the definition of a term that’s in your current project dictionary
  6212. just <Option> double-click on it. File-name marker-name links are
  6213. mainly for jumping to places in your (unparseable) supporting
  6214. documentation.
  6215.  
  6216. Tip: if you want to be able to jump to an illustration in a text file,
  6217. mark its location and then copy the marker name for pasting elsewhere.
  6218.  
  6219.  
  6220. §    Go Back
  6221. This command takes you back to your last signficantly different
  6222. position in a text file. Usually the two positions will be in the same
  6223. file, and a typical use is to “toggle” back and forth within a function
  6224. between the spot where you’re creating code and the top of the function
  6225. where the locals and parameters are declared.
  6226.  
  6227. Whenever you move your insertion point or make a new selection, you
  6228. define a “significantly different” position to go back to if you: bring
  6229. a different text window to the front, or; click more than 3/4 of a
  6230. window away from your previous position. You can alter your current
  6231. position without spoiling the memory of your previous position by
  6232. inching along—click half a window away, scroll, click half a window
  6233. away, scroll….
  6234.  
  6235. You can also toggle between two positions in a file with markers, or
  6236. “go to” links, or by pressing <Enter> to switch between the top and
  6237. bottom ends of a large selection.
  6238.  
  6239.  
  6240.  
  6241.  
  6242.  
  6243.  
  6244.  
  6245.  
  6246.  
  6247.  
  6248.  
  6249.  
  6250.  
  6251.  
  6252.  
  6253.  
  6254.  
  6255.  
  6256.  
  6257.  
  6258.  
  6259.  
  6260.  
  6261.  
  6262.  
  6263.  
  6264.  
  6265.  
  6266.  
  6267.  
  6268.  
  6269.  
  6270.  
  6271.  
  6272.  
  6273.  
  6274.  
  6275.  
  6276.  
  6277.  
  6278.  
  6279.  
  6280.  
  6281.  
  6282.  
  6283. (Note the link text
  6284.     «hAWK User's Manual» «F        Running hAWK programs»
  6285. could have been abbreviated as say
  6286.     «hAWK Man»«running»
  6287. —when both file and marker name are in «» quotes, the file
  6288. and marker names just have to be reasonably close to the
  6289. actual names.)
  6290.  
  6291. -    -    -    -    -    -    -    -    -    -    -    - - -
  6292. Markers and the Locations menu
  6293. -    -    -    -    -    -    -    -    -    -    -    - - -
  6294. §    Introduction
  6295. A “marker” is a marked location in your text consisting of a start
  6296. point, an end point, and a name to be associated with the marked
  6297. position. Typically, you’ll place markers in your C source files
  6298. all at once with the Automark command, and you’ll place markers in
  6299. supporting documents one-at-a-time with the Mark command. Marks can
  6300. be placed in header files with Automark, but you may prefer to use
  6301. Mark. To bring up a popup menu of a window’s markers, hold down the
  6302. <Option> or <Command> key and click in the window’s title bar.
  6303.  
  6304. EnterAct's default behavior is to automatically generate markers
  6305. for all functions in source files and all struct/class definitions
  6306. in header files as you open or save the files, and to not save those
  6307. markers with the document. If you manually insert markers in a
  6308. document that goes in your project's rightmost (documentation)
  6309. pane, these markers will be saved with your document when you
  6310. save the file (this manual is an example). You can force EnterAct
  6311. to save source and header file markers with your files by
  6312. enabling the the “Save source/headers marks” option, but the
  6313. only use for this at present is to allow the “Index Marker Names…”
  6314. command to index marks in your source files.
  6315.  
  6316. At present EnterAct does not support #pragmas for inserting
  6317. special markers in source files.
  6318.  
  6319. Markers do stay attached to the proper position as you edit the file
  6320. around them, but any editing that’s done inside the marked range will
  6321. correspondingly expand or shrink the range associated with the marker.
  6322. If you remove all of the text that is within the marked range, you will
  6323. also remove the marker, and this is not undoable. Markers do not
  6324. survive cutting or pasting—they stay attached to the text only as long
  6325. as the text remains in the document. 
  6326.  
  6327. The Automark command is mainly useful to mark all of the function
  6328. definitions in a source file, though it has other options, and can be
  6329. used to mark a variety of C constructs, with the option of marking just
  6330. the first in a group. There is little need for this command, since
  6331. EnterAct's default behaviour is to mark source files for you without
  6332. your intervention.
  6333.  
  6334. Marker names can be used as links within or between files, in
  6335. conjunction with the “Go to” command. Called “Go to” links, these take
  6336. the form
  6337. ____
  6338.     «file name» «marker name»
  6339. ____
  6340. where the enclosing «» quotes are usually optional. Where a link is
  6341. present in your text, you can go to it by selecting the file name and
  6342. marker name (including «» quotes if present), or by clicking anywhere
  6343. on the line, and issuing the “Go to” command. For an easy way to
  6344. generate the text for these links, see “Copying marker names” below.
  6345. You’ll find details on using “Go to” links in the “‘Go’ commands”
  6346. chapter.
  6347.  
  6348. Please note your markers will be maintained properly only by editors
  6349. that implement MPW–compatible marks. This includes just about all
  6350. editors.
  6351.  
  6352.  
  6353. §    Mark
  6354. To place a single marker, select either an insertion point or the range
  6355. of text that you want remembered, and then select the Mark command.
  6356. You will be asked to supply or modify a name for the marker: click Add,
  6357. and then forever after you will be able to jump to that marker whenever
  6358. you want (marks are saved to disk and properly maintained).
  6359.  
  6360.  
  6361.  
  6362.  
  6363.  
  6364.  
  6365.  
  6366.  
  6367.  
  6368.  
  6369. §    Marker menus
  6370. Every document containing marks has a popup marker menu associated with
  6371. its window. To jump to a marker, hold down either the <Option> or
  6372. <Command> key or both and click-and-hold in the title bar of your
  6373. window. You’ll see a popup menu listing all of the markers attached
  6374. to your file. Pick one, and you go there. The markers are in
  6375. alphabetical order.
  6376.  
  6377.  
  6378.  
  6379.  
  6380.  
  6381.  
  6382.  
  6383.  
  6384.  
  6385.  
  6386.  
  6387.  
  6388.  
  6389.  
  6390.  
  6391.  
  6392.  
  6393.  
  6394.  
  6395.  
  6396.  
  6397.  
  6398.  
  6399.  
  6400.  
  6401.  
  6402.  
  6403.  
  6404. If the name of a marker is present in your text, you can also go to
  6405. it by selecting the name and using the Go to command, as explained in
  6406. the “‘Go’ commands” chapter.
  6407.  
  6408.  
  6409.  
  6410. §    Unmark
  6411. To remove one or more markers, select Unmark. You will be presented
  6412. with a list of markers to select for deletion. This list follows the
  6413. standard Macintosh rules for list selection: click with no keys held
  6414. down to select a single marker (this deselects any other selected
  6415. markers); click with the <Shift> key down to select a contiguous range
  6416. of markers while dragging the mouse; and click with the <Command> key
  6417. held down to select a marker that is away from other selected markers
  6418. (the markers in between are left unselected). 
  6419.  
  6420.  
  6421.  
  6422.  
  6423.  
  6424.  
  6425.  
  6426.  
  6427.  
  6428.  
  6429.  
  6430.  
  6431.  
  6432.  
  6433.  
  6434. To quickly remove all markers from a document, use the Automark command
  6435. with only the “Clear all present markers first” option checked.
  6436.  
  6437.  
  6438. §    Automark
  6439. This command is largely obsolete, and not recommended for any
  6440. purpose except removing all marks from a file that lives in the
  6441. documentation pane of a project. EnterAct's default behaviour is
  6442. to mark all source and header files for you automatically, and
  6443. this should be all you need.
  6444.  
  6445. This command works with any first-draft or compilable C file, whether
  6446. or not it has been added to your project.
  6447.  
  6448. The Automark command can be used to remove all marks from any file
  6449. (source or not), by checking just the “Clear all present markers first”
  6450. option.
  6451.  
  6452.  
  6453.  
  6454.  
  6455.  
  6456.  
  6457.  
  6458.  
  6459.  
  6460.  
  6461.  
  6462.  
  6463.  
  6464.  
  6465.  
  6466.  
  6467. If you wish to keep special markers that you have manually added, leave
  6468. “Clear all present markers first” without a check mark. When a
  6469. duplicate name or position is found while adding markers, the new entry
  6470. will replace the old one.
  6471.  
  6472. The “first of group only” checks have slightly different
  6473. interpretations: for #defines, it means mark only the first of a group
  6474. of consecutive #defines; for enum constants, it means mark only the
  6475. first within an enum {} statement; and for variables it means mark the
  6476. first of a group of consecutive variables, whether they occur in the
  6477. same statement or in separate statements. If you leave some types
  6478. unselected then EnterAct’s automarker won’t count them as separating,
  6479. say, two groups of variables or #define’s.
  6480.  
  6481. To keep things sane, there is a limit of 499 marks to a file. This is
  6482. a 9 foot popup menu, a bit tedious to scroll through even with a 68070.
  6483. Marker names are limited to 63 characters, but the range of text you
  6484. mark with the name can be as long as you want.
  6485.  
  6486.  
  6487.  
  6488.  
  6489. §    Copying marker names
  6490. To put text of the form «file name» «marker name» on the clipboard for
  6491. a particular marker, hold down the<Shift> key and either the <Option>
  6492. of <Command> key while clicking in the title bar of the marker’s window
  6493. to access the marker popup menu; selecting the marker from the popup
  6494. will put the text on your clipboard. This is the same as going to the
  6495. mark by selecting it from the popup marker menu, except that in
  6496. addition you hold down the <Shift> key.
  6497.  
  6498.  
  6499.  
  6500.  
  6501.  
  6502.  
  6503.  
  6504.  
  6505.  
  6506.  
  6507.  
  6508.  
  6509.  
  6510.  
  6511.  
  6512.  
  6513.  
  6514.  
  6515.  
  6516.  
  6517.  
  6518.  
  6519.  
  6520.  
  6521.  
  6522.  
  6523.  
  6524.  
  6525.  
  6526. Text of the form «file name» «marker name»  can be used with the Go
  6527. to command to jump to any marker in any project file, and variations
  6528. on this theme are available as detailed in the “‘Go’ commands” chapter.
  6529.  
  6530. §    The Locations menu
  6531. This menu allows you to mark and jump to up to 10 different locations.
  6532. You can mark positions in any text file, and they stay recorded in the
  6533. Locations menu until you delete them, independent of whatever project
  6534. you might have open. This is a generalization of the "Go Back" command,
  6535. allowing you to go back to any specific location.
  6536.  
  6537. If you edit files with some other editor, your remembered locations
  6538. may be thrown off, in which case you could delete and re-add them.
  6539. (Function and struct markers that are created automatically by
  6540. EnterAct are not thrown off if you edit files with some other editor.)
  6541.  
  6542. To add a position to the Locations menu:
  6543.     • select the position you want, and optionally some text there
  6544.     • pick Add Current Location from the Locations menu
  6545.     • a dialog will appear which allows you to set the position's
  6546.     name as it will appear under the Locations menu: if you selected
  6547.     some text at the position to be marked, that text will appear in
  6548.     the dialog. You can edit the name, put in an arbitrary name, or
  6549.     have no name at all--in this case, EnterAct will concoct a name
  6550.     for you, made up of the file name, line position, any enclosing
  6551.     function name and maybe other stuff.
  6552.  
  6553.  
  6554.  
  6555.  
  6556.  
  6557.  
  6558.  
  6559.  
  6560.  
  6561.  
  6562. To jump to a position you've added to the Locations menu:
  6563.     • pick it from the Locations menu.
  6564.  
  6565. To delete a position from the Locations menu:
  6566.     • go to the position (pick it from the Locations menu for example)
  6567.     • select Delete Current Location from the Locations menu
  6568.     • if the location can't be found, you will be asked if you want to
  6569.         delete the location from the menu.
  6570.  
  6571. When you hit the limit of 10 marked locations, you won't be able
  6572. to add any more until you delete one of the remembered locations.
  6573.  
  6574.  
  6575. -    -    -    -    -    -    -    -    -    -    -    -
  6576. Options, under the Edit menu
  6577. -    -    -    -    -    -    -    -    -    -    -    -
  6578.  
  6579. §    Introduction
  6580. You can change any of the options at any time. Defaults for the options
  6581. have been selected to give best performance under average conditions.
  6582. Options are saved with EnterAct itself rather than a project. Some of
  6583. them you’ll set once and forget, but the number of lookup windows and
  6584. the number of entries per lookup determine how cluttered your screen
  6585. can get, and how many alternate entries a lookup window will hold, so
  6586. you’ll vary these two numbers to suit particular circumstances.
  6587.  
  6588. For a discussion of “Safe switching under MultiFinder” see the next
  6589. chapter, “Switching to other applications”.
  6590.  
  6591. For a discussion of “Save activities to disk” see “Show Activities”
  6592. near the end, in the section “Turning activity recording on and off”.
  6593.  
  6594.  
  6595. §    Number of lookup windows
  6596. This box allows you to set the maximum number of lookup windows that
  6597. can appear on–screen at one time. For complicated situations you may
  6598. want more than 4, whereas on a small screen you may prefer fewer than
  6599. 4 to avoid clutter.
  6600.  
  6601.  
  6602.  
  6603.  
  6604.  
  6605.  
  6606.  
  6607.  
  6608.  
  6609.  
  6610.  
  6611.  
  6612.  
  6613.  
  6614.  
  6615.  
  6616.  
  6617.  
  6618.  
  6619.  
  6620.  
  6621.  
  6622.  
  6623. §    Number of entries per lookup window
  6624. The number in this box determines how may dictionary entries will be
  6625. retrieved in a lookup window, if your spelling does not match any term
  6626. in the dictionary exactly. If your spelling does match a term exactly,
  6627. all exact matches will be retrieved, up to a maximum of 60. You may
  6628. wish to temporarily increase the number in this box if your
  6629. recollection of the spelling of a term is shaky. On a regular basis,
  6630. you may prefer 3 or 5 entries rather than 4—a bit of experience will
  6631. tell.
  6632.  
  6633.  
  6634. §    Remembering window locations
  6635. By default, EnterAct will remember the window locations of all your
  6636. documents (saved in a small resource with the document). Also, you will
  6637. not be asked if you want to save changes to a document when you close
  6638. it if the only change is a change in window location (the “don’t
  6639. pester” option). You can take advantage of the remembered window
  6640. locations to work with groups of documents; arrange each group nicely
  6641. on the screen, and then if you later reopen the documents in that group
  6642. they will be arranged on–screen where you left them.
  6643.  
  6644.  
  6645.  
  6646.  
  6647.  
  6648.  
  6649.  
  6650.  
  6651.  
  6652.  
  6653.  
  6654.  
  6655.  
  6656.  
  6657.  
  6658.  
  6659.  
  6660.  
  6661.  
  6662.  
  6663.  
  6664.  
  6665.  
  6666. §    Long or short windows
  6667. If there is no remembered location for a document, or if you have
  6668. switched off the “Save document window locations” option, then a
  6669. newly–opened window will come up near the top of your screen, with a
  6670. relatively short or long length according to what you select in the
  6671. option “Windows open short/long by default”. You may not notice much
  6672. of a distinction if you have a small screen. This short/long option
  6673. always governs the appearance of new text windows, and of text files
  6674. created by other applications that have never been saved while using
  6675. EnterAct.
  6676.  
  6677.  
  6678. §    Reformat Selection options
  6679. Reformat Selection will rebreak the lines in a selection of text to
  6680. improve the appearance of the right margin. Aside from selecting a
  6681. “ragged right” or “full justification” look, you can also set the
  6682. maximum number of characters per line in the “Reformat line width” box.
  6683. The default of 74 gives a reasonable and printable line in Monaco 9.
  6684.  
  6685.  
  6686.  
  6687.  
  6688.  
  6689.  
  6690.  
  6691.  
  6692.  
  6693.  
  6694.  
  6695.  
  6696.  
  6697.  
  6698.  
  6699.  
  6700.  
  6701.  
  6702.  
  6703.  
  6704.  
  6705.  
  6706.  
  6707. §    Detect nested comment starts
  6708. This option is on by default, meaning that EnterAct will accurately
  6709. trap any single failure to properly start or end a comment, both while
  6710. building your dictionary and while balancing. If you are in the habit
  6711. of doubling up on comment starts, as in
  6712. ____
  6713.     /*#define Flag37 /* if defined, use SlowDraw */
  6714. ____
  6715. and if you are not willing to mend your ways, uncheck this option:
  6716. comment starts within a comment will then be ignored for dictionary
  6717. and balance purposes. Just make sure you type carefully!
  6718.  
  6719.  
  6720.  
  6721.  
  6722.  
  6723.  
  6724.  
  6725.  
  6726.  
  6727.  
  6728.  
  6729.  
  6730.  
  6731.  
  6732.  
  6733.  
  6734.  
  6735.  
  6736.  
  6737.  
  6738.  
  6739.  
  6740. §    Ignore 'ckid's
  6741. A 'ckid' is a resource that SourceServer uses to keep track of
  6742. whether a file is modifiable or read-only, and also if the file's
  6743. status has been changed from read-only to modifiable by an
  6744. editor while the file was checked out. EnterAct obeys these
  6745. resources (a "no pencil" icon appears in the window's display
  6746. box for read-only), and allows you to make changes to a
  6747. read-only file after you select the "Modify Read Only"
  6748. command.
  6749.  
  6750.  
  6751.  
  6752.  
  6753.  
  6754.  
  6755.  
  6756.  
  6757.  
  6758.  
  6759.  
  6760.  
  6761.  
  6762.  
  6763.  
  6764.  
  6765.  
  6766.  
  6767.  
  6768.  
  6769.  
  6770.  
  6771. Selecting "Ignore 'ckid's" in the Options dialog will force
  6772. EnterAct to completely ignore these resources. You’ll be able
  6773. to edit a file that was checked out as read-only, and the
  6774. SourceServer will never know. This can really screw things up.
  6775. Don’t do it. There, you’ve been warned.
  6776.  
  6777. §    Relocate files automatically
  6778. When this box is unchecked (the default), EnterAct will present
  6779. a dialog asking you to relocate a file whenever it loses track of
  6780. where a file is. This typically happens when you trash a whole
  6781. folder and replace it with a newer version. If you check this
  6782. box, then if EnterAct loses track of a file it will attempt to
  6783. relocate it without your help, by searching down from the top
  6784. level of the disk where it was last seen. If this doesn't work,
  6785. you'll still be asked to help.
  6786.  
  6787. Check the "Relocate files automatically" box only if you're sure that
  6788. each of your source files is uniquely named on the disk where you've
  6789. stored it. If you can't guarantee that, then please leave the box unchecked,
  6790. and put up with the occasional request to relocate a file -- it's no
  6791. more painful than resetting file paths with Code Warrior.
  6792.  
  6793. Note that if you just move a folder around on the same disk,
  6794. or rename a folder, EnterAct will still keep track of where
  6795. the contained files are. To make EnterAct lose track of a file,
  6796. you have to move it to a different folder, including the case of
  6797. trashing a folder and replacing it with one that has the same name.
  6798. (What about renaming the file? From EnterAct's point of view,
  6799. if you rename a file then it's a different file, and you'll have to
  6800. add it separately to your project.)
  6801.  
  6802. §    Automark source files
  6803. The "AutoMark source..." check box will create marks for all functions
  6804. in a source file when you open it, and marks for struct and class
  6805. definitions in headers. The marks are redone (to pick up new functions
  6806. etc) whenever you access the popup marker menu for a file after
  6807. editing it, or when you Save a file.
  6808.  
  6809. “Automark source/headers...” is ON by default.
  6810.  
  6811.  
  6812.  
  6813.  
  6814.  
  6815.  
  6816.  
  6817.  
  6818.  
  6819.  
  6820.  
  6821.  
  6822.  
  6823.  
  6824.  
  6825.  
  6826.  
  6827.  
  6828.  
  6829.  
  6830.  
  6831.  
  6832. §    Save source/headers marks
  6833. You can force EnterAct to save source and header file markers
  6834. with your files by enabling the the “Save source/headers marks”
  6835. option, but the only use for this at present is to allow the
  6836. “Index Marker Names…” command to index marks in your source files.
  6837.  
  6838. “Save source/headers marks” is OFF by default.
  6839.  
  6840. §    Append arguments for automarked functions
  6841. This checkbox (see illustration above) controls whether summaries of
  6842. arguments to functions and methods are appended in the popup marker
  6843. menu for source and header files. This is ON by default. It's handy for
  6844. distinguishing between functions with the same name that take
  6845. different arguments, and for a quick reminder of what arguments a
  6846. function takes.
  6847.  
  6848. Addin the argument summaries takes a while, so if you have a slow
  6849. machine you might prefer to turn this option off. It's OK on a 68040
  6850. running at 25Mhz.
  6851.  
  6852. §    Record Find, Find Again, Find Definition
  6853. If you do a lot of Find's and jumping to definitions, these activities
  6854. can clutter up your activity log. Turn this option off if you'd rather
  6855. have your activity log hold just the more interesting activities, and
  6856. don't mind losing some information about where you went.
  6857.  
  6858. This option is ON by default.
  6859.  
  6860.  
  6861.  
  6862.  
  6863.  
  6864.  
  6865.  
  6866.  
  6867.  
  6868.  
  6869.  
  6870.  
  6871.  
  6872.  
  6873.  
  6874.  
  6875.  
  6876.  
  6877.  
  6878.  
  6879.  
  6880.  
  6881. -    -    -    -    -    -    -    -    -    -    -    -
  6882. Switching to other applications
  6883. -    -    -    -    -    -    -    -    -    -    -    -
  6884. §    Under the Finder (System 6)
  6885. There are some nifty INIT’s that will let you switch between
  6886. applications under the Finder almost as quickly and easily as if you
  6887. were using MultiFinder—On Cue and Master Juggler come to mind.
  6888. (OK, you got me - this manual was started in 1990, and there are
  6889. a few "fossils" here and there....)
  6890.  
  6891. Whatever means you employ to switch to another application from
  6892. EnterAct while under the Finder, you will be asked if you wish to save
  6893. any documents that need saving, and they will all be closed. The
  6894. situation with MultiFinder (or System 7) is different , since documents
  6895. can be left open when switching to another application.
  6896.  
  6897.  
  6898. §    Under MultiFinder (or System 7 or later)
  6899. If you switch from EnterAct to some other application while under
  6900. MultiFinder or System 7, you will not be required to close your
  6901. documents. This means that while using the other application you could
  6902. attempt to access documents that you have left open in EnterAct. If
  6903. this potential conflict weren’t handled, you could end up working with
  6904. two different versions of the same document, and inevitably you would
  6905. lose one version.
  6906.  
  6907. One solution to this problem would be to prevent you from opening that
  6908. document with any other application if it is left open in EnterAct.
  6909. This restrictive “my file and you can’t have it” attitude is
  6910. appropriate if an application is meant for use on a network, where
  6911. several people could want access to the same file at once.
  6912.  
  6913. However, EnterAct is not meant to provide source code management
  6914. with multiple users (many packages such as Projector, VOODOO, MW
  6915. CodeManager etc can be used in addition to EnterAct to provide full
  6916. source code management), so it does not take this approach. Instead,
  6917. when you switch, all open documents are quietly saved if they need
  6918. saving and have ever been saved before (“untitled” documents present
  6919. no problem—you can’t get at them with another application). In
  6920. addition, when you return to EnterAct, EnterAct will check your disk to
  6921. see if you have altered any of the open documents while you were
  6922. away—if so, they will be quietly reloaded. EnterAct, if effect, opts for
  6923. the “low man on the totem pole” position when it comes to having
  6924. control over file access, and does the necessary behind–the –scenes
  6925. work to allow you to leave files open and still be able to open and
  6926. change them with other applications.
  6927.  
  6928. To make this bulletproof, it will be safest if you close all text
  6929. documents when leaving the other application, since that other
  6930. application will typically not be able to compensate for files being
  6931. changed “behind its back” in EnterAct.
  6932.  
  6933. You can, if you wish, defeat this protection by unchecking the “Safe
  6934. switching under MultiFinder” option in the Options dialog. However,
  6935. EnterAct will not restrict access to open files when you switch, so
  6936. you will be entirely responsible for ensuring that you don’t end up
  6937. with two versions of the same file floating around. Closing all open
  6938. text documents before switching would be sufficient.
  6939.  
  6940.  
  6941.  
  6942.  
  6943.  
  6944.  
  6945.  
  6946.  
  6947.  
  6948.  
  6949.  
  6950.  
  6951.  
  6952.  
  6953.  
  6954.  
  6955.  
  6956.  
  6957.  
  6958.  
  6959.  
  6960.  
  6961.  
  6962. Safe switching protection can also be defeated on a per–switch basis,
  6963. by holding down any of the <Shift>, <Option>, or <Command> modifier
  6964. keys while you switch. Holding down a modifier key while you switch
  6965. out from EnterAct means that unsaved changes to files will be left
  6966. unsaved, and when you return to EnterAct any files open in EnterAct
  6967. that were changed elsewhere will not be updated for you on–screen.
  6968. Holding down a modifier key while returning to EnterAct will prevent
  6969. just the updating on–screen of any files that were changed elsewhere.
  6970. This is, on rare occasions, handy if you change a file with some other
  6971. application, realise you’ve made a mistake but can’t revert, and wish
  6972. to recover the version of your file that’s still open in EnterAct.
  6973.  
  6974. If you wish to have several people working on the same source
  6975. files at the same time with EnterAct, your best approach is to
  6976. use SourceServer or some other version of source control that
  6977. uses 'ckid's to mark files as modifiable or read-only.
  6978.  
  6979. §    Check the disk for changes
  6980. When you edit source (.c or .h) files that are in an EnterAct project
  6981. with some other application, select Update Dictionary when
  6982. you reopen the project to ensure that your dictionary is brought up
  6983. to date, unless you clearly recollect that you didn’t change anything
  6984. outside of a function body. This update typically takes only a few
  6985. seconds.
  6986.  
  6987. Only the project you have open will track which files are changed, so
  6988. if you switch to a different project you will also need to select
  6989. Update Dictionary to rebuild the dictionary if any .c or .h
  6990. files in the project were changed while the project was not open,
  6991. whether or not the files were changed with EnterAct.
  6992.  
  6993. Experience suggests that it's more efficient to update your EnterAct
  6994. dictionary when you notice that it's producing lookup that's out of
  6995. date (unless more than one person is involved, in which case you may
  6996. be better off doing the Update routinely).
  6997.  
  6998. §    Working with THINK C
  6999. This section describes working with THINK C as a separate application:
  7000. to use EnterAct as a replacement for THINK’s own editor (the “use
  7001. external editor” Edit option in THINK C version 6 or later) please see
  7002. Appendix 4.
  7003.  
  7004. If you adopt EnterAct as your C editor of choice, you’ll often change
  7005. several files with EnterAct over an extended period, and then switch
  7006. to THINK C to bring your application up to date. Fortunately, there
  7007. is no need to keep exact track of which files you change, since THINK
  7008. C’s Make command can do this for you. Call up the Make dialog, click
  7009. the “Use Disk” button, and, after the brief wait while THINK C checks
  7010. the modification dates of your project files, click the “Make” button
  7011. to bring your THINK C project fully up to date. If you remember exactly
  7012. which files were changed, you can instead select them one by one in
  7013. the project window and use the “Compile” command to update your THINK
  7014. C project.
  7015.  
  7016. Conversely, if you use THINK C to make some changes to your source
  7017. files, you can bring your EnterAct project fully up to date by
  7018. selecting the Update Dictionary command from the EnterAct
  7019. menu, as mentioned above. Note this step is not necessary if your
  7020. changes while in THINK C were restricted to function bodies, which
  7021. should often be the case. This is because EnterAct does nothing with
  7022. function bodies except check them for balance in a few key delimiters.
  7023.  
  7024. Editing files with THINK C, or any other editor besides EnterAct, will
  7025. compromise your ability to revert files to earlier versions with
  7026. EnterAct (see the “Show Activities” chapter). That’s worth remembering,
  7027. but in practice the need to revert a file is so rare that you shouldn’t
  7028. let it influence your editing. If you do need to revert files regularly,
  7029. you're better off using some sort of version control software.
  7030.  
  7031. -    -    -    -    -    -    -    -    -    -    -    -
  7032. Show activities
  7033. -    -    -    -    -    -    -    -    -    -    -    -
  7034. §    Introduction
  7035. EnterAct will, at your option, keep track of your recent activities
  7036. in full detail. The Show Activities command under the Edit menu
  7037. generates a window holding descriptions of those activities, with
  7038. details in plain English of what, when, and where. Here are three
  7039. typical entries from the “••Recent Activities••” window generated by
  7040. Show Activities:
  7041. ____
  7042.  
  7043. ¶148
  7044. Tue Jan 12, 1993 8:22:23 pm OPEN «PICT saving»
  7045. ¬
  7046. ¶149
  7047. Tue Jan 12, 1993 8:23:17 pm CUT «PICT saving» 45 1 (temp)
  7048. <=deleted 289 characters:
  7049. «/* save pict "dataH" under the full path name "fileName", on
  7050. the volume "volumeName" */
  7051.     /* open the file, which should already exist */
  7052.     pb.ioCompletion = 0L;
  7053.     pb.ioNamePtr = (StringPtr)fileName;
  7054.     pb.ioVRefNum = 0;
  7055.     pb.ioVersNum = 0;
  7056.     pb.ioPermssn = 3; /* = fsRdWrPerm */
  7057.     pb.ioMisc = 0L;»
  7058. ¬
  7059. ¶150
  7060. Tue Jan 12, 1993 8:23:21 pm CLOSE «PICT saving»
  7061. ¬
  7062.  
  7063. ____
  7064. —where, for example, “CUT «PICT saving» 45 1 (temp)” means characters
  7065. were cut from the document “PICT savings” starting at line 45 position
  7066. 1, and the cut was temporary, ie not saved to disk—if it had been,
  7067. there would have been a SAVE before the CLOSE. Both file names and data
  7068. are enclosed in European-style quotes «».
  7069.  
  7070. Activity records are kept on disk in the log file “EnterAct Recent
  7071. Activities”. This file is created and managed for you, and is preserved
  7072. between sessions. Your most-recent 10,240 activities will be recorded
  7073. in full detail, up to the limits of 65,535 characters per insert or
  7074. delete, and a total of 1,310,720 characters of inserts and deletes for
  7075. the 10,240 activities (typically only 1/4 or less of that is needed).
  7076. Everything of interest, including all edits, searches,
  7077. open/close/save/save as, switching in and out, etc will be recorded.
  7078.  
  7079. Armed with a display of your recent activities, you will typically be
  7080. able to:
  7081.     •    remind yourself of what you did recently (another form of “context
  7082.         restoration”)
  7083.     •    selectively undo or recover the contents of any recent insert or
  7084.         delete
  7085.     •    generate a reverted version of a file, back to a particular activity
  7086.         (multiple files can be done one file at a time, back to different
  7087.         activities)
  7088.  
  7089. To turn the recording of activities off temporarily, select the menu
  7090. item named Recording activities under the Edit menu: it will change
  7091. to read Not recording activities. This is a toggle, and selecting it
  7092. again will turn recording back on. Your recording status is remembered
  7093. between sessions.
  7094.  
  7095. If you’re just interested in a quick first look, skim through the
  7096. “What’s shown” and “Reviewing activities” sections later in this
  7097. chapter.
  7098.  
  7099. To revert one or more files, you’ll need to follow the checklist in
  7100. the “Reverting a file” section, since the procedure is relatively
  7101. lengthy. For other uses of the “••Recent Activities••” window, an
  7102. understanding of the format of a displayed activity is all you really
  7103. need. Many obvious points are explained at length below, both to scrub
  7104. away the fuzziness from some intuitive notions and to introduce you
  7105. gently to what is, at heart, a simple way of keeping track of what
  7106. you’ve done recently.
  7107.  
  7108.  
  7109. §    What’s recorded
  7110. Full details on the following activities are recorded in the log file
  7111. “EnterAct Recent Activities”:
  7112.     •    all edits which affect your text, including typing, Cut, Paste,
  7113.         Paste Selection Behind, Undo, and replacements done with any of the
  7114.         replacement commands under the Search menu. The only notable edit
  7115.         exception is Copy
  7116.     •    all search results, in one or multiple files
  7117.     •    session start and end, switching in and out, running a Drag_on Modul
  7118.     •    Open, Close, Save, Save As, Revert, for text, lookup, PICT, and
  7119.         project windows (when applicable)
  7120.     •    Go to, Go Back, Go to Top, Go to Bottom, and jumping to a definition
  7121.  
  7122. After starting EnterAct at least once, you’ll find your log file in
  7123. the same folder as EnterAct itself, and you’ll probably be able to
  7124. identify it as a “log” file just by its icon. Note that it is not a text
  7125. file, at least not entirely, and its contents can be shown only with
  7126. EnterAct’s Show Activities command.
  7127.  
  7128. For each activity, the following information will be recorded, if
  7129. appropriate:
  7130.     •    the name of the activity (eg TYPING, SAVE, RUN DRAG_ON MODULE)
  7131.     •    the time at which it occurred
  7132.     •    the name of the file in which it occurred
  7133.     •    the position in the file at which it occurred, specifically the
  7134.         starting position if it was an insert, delete, or Find of some sort
  7135.     •    for inserts and deletes, the full contents, and the size of the edi
  7136.     •    for search and replace, the found text and the replacement text
  7137.     •    for Save As only, the previous name of the window.
  7138.  
  7139. Inserts and deletes are recorded as separate activities, even if they
  7140. result from a single command. For example, pasting over a selection
  7141. will be recorded as a delete followed by an insert:
  7142. ____
  7143. ¶7
  7144. Wed Jan 13, 1993 9:27:52 pm PASTE «Untitled-1» 1 1
  7145. <=deleted 35 characters:
  7146. «This text was deleted when pasting.»
  7147. ¬
  7148. ¶8
  7149. Wed Jan 13, 1993 9:27:52 pm PASTE «Untitled-1» 1 1
  7150. =>inserted 38 characters:
  7151. «This text was pasted over a selection.»
  7152. ¬
  7153. ____
  7154. The recorded file position of an edit is of course the position as
  7155. calculated at the time the activity occurred. Thus, for example, if
  7156. you inserted some text at line 100, character position 3 in a file,
  7157. the recorded position will be line 100, position 3. However, a
  7158. subsequent edit before the position of that insert, for example a
  7159. delete of lines 20 through 29 in the same file, will alter the position
  7160. you would want to examine if you now went looking for that insert,
  7161. assuming you saved your file. Instead of finding the inserted text at
  7162. line 100, you would find it at line 90. This is called the “updated”
  7163. position of the activity. As you’ll see in “What’s shown” below, you
  7164. have the choice of showing either original or updated positions.
  7165.  
  7166.  
  7167. §    Recording limitations
  7168. EnterAct does not record activities carried out in other applications,
  7169. in particular changes to text files. Editing files with some other
  7170. editor (such as THINK C) will compromise your ability to recover
  7171. reverted versions of files using EnterAct’s multiple undo capability,
  7172. in the following ways:
  7173.     •    if the edits elsewhere involved adding or removing lines, you will
  7174.         probably not be able to usefully revert the file with EnterAct
  7175.     •    if the edits elsewhere were fairly small, and did not involve adding
  7176.         or removing lines, then you will probably be able to recover a useful
  7177.         reverted version with EnterAct, but the small changes you made
  7178.         elsewhere will not be reflected in the reverted version.
  7179.  
  7180. Only your most-recent 10,240 activities will be recorded in the
  7181. “EnterAct Recent Activities” log file. The contents of your inserts
  7182. and deletes will be recorded up to a limit of 1,310,720 characters
  7183. total for all activities. In addition,
  7184. inserts and deletes will be fully recorded only if they do not
  7185. exceed 65,535 characters. For edits exceeding this limit, only the
  7186. first 1,024 characters will be recorded for reference.
  7187.  
  7188. Typically:
  7189.     •    10,240 activities represents several days of work. If you want to
  7190.         estimate how far back your activity log goes, bear in mind that inserts
  7191.         and deletes are recorded as separate activities, a run of characters
  7192.         typed without changing the insertion point counts as a single insert,
  7193.         and usually for every insert or delete there is one activity of some
  7194.         other kind such as a save or search. For example, at 4 activities
  7195.         per minute on average, you'll be logging your last 40 hours.
  7196.     •    large edits are rare enough that you won’t run into the recording
  7197.         limits. Your average number of characters per activity will probably
  7198.         be under 50, and, if you’re slightly paranoid like the rest of us, you
  7199.         will probably deal will very large edits by using Save As rather than
  7200.         Cut and Paste.
  7201. Minor activities, such as scrolling or changing windows, are not
  7202. recorded.
  7203.  
  7204. To avoid cluttering your activity log, a Replace All that is just used
  7205. for counting purposes is not recorded in detail. 
  7206.  
  7207. Based on personal experience, the limitation that most affects the
  7208. quality of recorded activities is of the “is it plugged in?” variety.
  7209. If you turn recording off temporarily, remember to turn it back on
  7210. again later!
  7211.  
  7212.  
  7213.  
  7214. §    Showing your recent activities
  7215. Selecting Show Activities from the Edit menu produces the following
  7216. dialog:
  7217.  
  7218.  
  7219.  
  7220.  
  7221.  
  7222.  
  7223.  
  7224.  
  7225.  
  7226.  
  7227.  
  7228.  
  7229.  
  7230.  
  7231.  
  7232.  
  7233.  
  7234. Select the “updated current positions” button to have activity
  7235. positions updated as much as possible. Select the “originally recorded
  7236. positions” button to leave line numbers and character positions
  7237. unchanged from their originally recorded values. For review or single
  7238. undo, you’ll want updated positions, but in order to perform a multiple
  7239. undo the original positions are required.
  7240.  
  7241. You may show up to 10,240 of your recent activities, and as you alter
  7242. the number of activities to show the “Memory needed” display at bottom
  7243. of the dialog will update. Showing a few activities will take 700K
  7244. or so of memory, and showing all 10,240 may require a couple of
  7245. meg or more. If you will need more memory than is available, try
  7246. closing all windows including your current project.
  7247.  
  7248. When you click the OK button, a plain-English description of your
  7249. activities will be generated, and shown to you in a window titled
  7250. either “••Recent Activities••” if you selected original positions, or
  7251. “••Recent Activities (updated)••” if you selected updated positions.
  7252.  
  7253. If you’re only interested in your last few activities, adjusting the
  7254. number of activities to show to a small number will reduce the time
  7255. it takes to generate this description.
  7256.  
  7257. "Show full path names for files" is useful if you have more that one
  7258. file with the same name. This will require slightly more memory for
  7259. all that extra text.
  7260.  
  7261.  
  7262. §    What’s shown
  7263. Here’s are some typical entries selected from a “••Recent Activities••”
  7264. display:
  7265. ____
  7266. ¶60
  7267. Sat Jan 16, 1993 10:51:48 pm PASTE «hAWK_FilesandClip.c» 390 4
  7268. =>inserted 50 characters:
  7269. «if (!dirs && !(fpb->ioFlAttrib & 16)) /* a file */»
  7270. ¬
  7271. ¶359
  7272. Sun Jan 17, 1993 5:53:14 pm SAVE AS «HuffCode.c»
  7273. Previous name was: «Untitled-1»
  7274. ¬
  7275. ¶858
  7276. Sun Jan 17, 1993 11:47:09 pm GO TO «EnterAct log» 1417 1
  7277. ¬
  7278. ¶868
  7279. Sun Jan 17, 1993 11:50:28 pm OPEN «CEDAR_Files.c»
  7280. ¬
  7281. ¶869
  7282. Sun Jan 17, 1993 11:50:28 pm FIND DEFINITION «CEDAR_Files.c» 3035 1
  7283. «GetSwitchOutTime»
  7284. ¬
  7285. ¶870
  7286. Sun Jan 17, 1993 11:50:43 pm FIND «CEDAR_Files.c» 43 23
  7287. «SwitchOutTime»
  7288. ¬
  7289. ¶926
  7290. Mon Jan 18, 1993 12:02:54 am SWITCH OUT 
  7291. ¬
  7292. ¶927
  7293. Mon Jan 18, 1993 12:07:31 am SWITCH IN 
  7294. ¬
  7295. ¶1001
  7296. Tue Jan 19, 1993 11:09:56 pm END OF SESSION 
  7297. ¬
  7298. ¶1002
  7299. Wed Jan 20, 1993 8:00:49 pm START OF SESSION 
  7300. ¬
  7301. ____
  7302. The first line of the activity record begins with “¶”, and is followed
  7303. by the activity number. The oldest activity shown is number 1, followed
  7304. by later (younger) activities up to the last thing you did, and its
  7305. number may be as high as 10,240.
  7306.  
  7307. The second line of the activity record shows the date and time,
  7308. followed by the name of the activity. These are present for all
  7309. activities, and for some activities (such as SWITCH OUT ) that may be
  7310. all there is before the ending “¬”.
  7311.  
  7312. If the activity involves a file or window, its name will be shown next
  7313. inside European style «» quotes. And if the activity relates to a
  7314. specific position in the file, this will be shown after the file name.
  7315. The position is for the start of the activity, and consists of the
  7316. starting line number followed by the character position at which the
  7317. activity started on that line. The first line in the file is line 1,
  7318. and the position before the first character on a line is position 1.
  7319.  
  7320. The third and following lines hold the data, if any, associated with
  7321. the activity. For inserts and deletes, the data will be preceded by
  7322. either “<=deleted xx characters” or “=>inserted xx characters” where
  7323. xx is the number of characters. In rare cases where the entire edit
  7324. could not be recorded, this will be followed by a number telling how
  7325. many characters of the edit have been retained, for example
  7326.     =>inserted 98765 characters (1024 shown)
  7327.  
  7328. The contents of an insert or delete will be trimmed if:
  7329.     •    the edit exceeds 65,535 characters; in this case, only the first
  7330.         1,024 characters will be recorded
  7331.     •    total recorded data would exceed 1.3Meg; in this case the
  7332.         data recorded for the oldest edits will be progressively trimmed until
  7333.         enough room is freed up to record the newest edit. The governing
  7334.         assumption is that the older an edit is, the less important it is,
  7335.         regardless of size. This approach has been chosen so that you will
  7336.         retain multiple-undo capabilities as far back as possible.
  7337.  
  7338. The data associated with the activity is enclosed in European-style
  7339. quotes «», and no characters are appended or altered inside the quotes,
  7340. though as described above characters may on rare occasions be trimmed
  7341. from the end.
  7342.  
  7343. Each activity finishes up with a “¬”, on a line by itself.
  7344. The SAVE AS  activity has a special format, with the second line
  7345. containing SAVE AS  followed by the new file name, and the third line
  7346. giving the previous name of the window, with accompanying text that
  7347. makes this clear.
  7348.  
  7349. The number of activities shown will often fall a few short of the
  7350. number you requested (typically by 1 or 2 per 100). These “missing
  7351. activities” were originally records of your typing. A sequence of
  7352. characters typed without moving the insertion point other than by
  7353. typing counts as, and is recorded as,  a single activity. However,
  7354. there is no such Macintosh event as “end of typing”, and EnterAct is
  7355. slightly conservative in its estimate of when you have finished typing
  7356. in a particular spot. Basically, any recordable activity is treated
  7357. as an “end of typing” event if typing was going on. For example, a Save
  7358. while typing would trigger a recording of your typing up to that point.
  7359. If you then continue typing in the same place, that typing record will
  7360. later be deleted, and a complete record of all your typing in the same
  7361. place will eventually be made. Normally this is of no consequence, and
  7362. now that you know what’s happening you shouldn’t let it affect you in
  7363. the slightest.
  7364.  
  7365.  
  7366.  
  7367. §    Temporary, obsolete, and undone activities
  7368. Though not recorded, the “current relevance” of any activity which
  7369. refers to a specific place in a file is inferred when you Show
  7370. Activities. As a result of later activities up to the time at which
  7371. you show them, an earlier activity may end up being currently classed
  7372. as:
  7373.     •    permanent; the document in which it occurred was saved to disk after
  7374.         the activity in question (ie not closed without saving, or unsaveable
  7375.         such as a lookup window). More accurately, an activity is permanent
  7376.         unless it falls into one of the following categories. “Permanent” is
  7377.         the default category, and permanent activities are not indicated in
  7378.         any special way in activity records.
  7379.     •    temporary; the window in which the activity occurred was
  7380.         subsequently closed without saving, but some version of the document
  7381.         currently exists on disk, so that in principle at least the activity
  7382.         still has a recoverable context. 
  7383.     •    obsolete; not only was the window closed after the activity, but
  7384.         no reasonable version of the document now exists on disk. This can
  7385.         happen if you insert text into a new window and then close it without
  7386.         saving, or if you edit an unsaveable window (such as a lookup window).
  7387.         This can also happen when you use Save As to replace an existing file
  7388.         “OldFile” with a new version; at that point, all previous activities
  7389.         relating to “OldFile”, especially inserts and deletes, become obsolete
  7390.         since they were later overwritten by a new version and hence no longer
  7391.         have a recoverable context in any meaningful sense.
  7392.     •    undone; a permanent activity that was subsequently reversed with
  7393.         the Undo command. All temporary and obsolete edits have already been
  7394.         “undone”, in the sense that from the point of view of your disk files
  7395.         they never happened.
  7396.  
  7397. If a file is open when you select Show Activities, all edits from the
  7398. last save or open of that file up to the present will be classed as
  7399. permanent. However, if you subsequently close the file without saving
  7400. it and then reselect Show Activities, you will find that those edits
  7401. have been reclassified as temporary. And if you later save over the
  7402. file by using Save As, effectively replacing its contents with the
  7403. contents of some other file, then the activities will be reclassified
  7404. as obsolete.
  7405.  
  7406. If an activity is classed as temporary, obsolete, or undone, you’ll
  7407. see “(temp)", “(obs)", or “(undone)" respectively in the activity
  7408. record, following the file name and position numbers. Here are some
  7409. examples to help bring this into focus, each followed by a brief
  7410. explanation:
  7411. ____
  7412. ¶25
  7413. Wed Jan 20, 1993 9:55:07 pm OPEN «HuffCode.c»
  7414. ¬
  7415. ¶26
  7416. Wed Jan 20, 1993 9:55:37 pm TYPING «HuffCode.c» 4 1 (temp)
  7417. =>inserted 69 characters:
  7418. «This text was typed into "HuffCode.c",and then the typing was     
  7419. undone.»
  7420. ¬
  7421. ¶27
  7422. Wed Jan 20, 1993 9:55:37 pm UNDO «HuffCode.c» (temp)
  7423. ¬
  7424. ¶28
  7425. Wed Jan 20, 1993 9:55:46 pm CLOSE «HuffCode.c»
  7426. ¬
  7427. ____
  7428. (Note that the document “HuffCode.c” was closed without saving. The
  7429. typing is classed as temporary, which takes precedence over the undoing
  7430. of the typing. The same would be true of an obsolete edit that was
  7431. undone—it would be classed as obsolete.)
  7432.  
  7433. ____
  7434. ¶31
  7435. Wed Jan 20, 1993 9:58:16 pm OPEN «Untitled-2»
  7436. ¬
  7437. ¶32
  7438. Wed Jan 20, 1993 9:58:46 pm TYPING «Untitled-2» 1 1 (obs)
  7439. =>inserted 87 characters:
  7440. «This text was typed into the window "Untitled-2", which was
  7441. then closed without saving.»
  7442. ¬
  7443. ¶33
  7444. Wed Jan 20, 1993 9:58:48 pm CLOSE «Untitled-2»
  7445. ¬
  7446. ____
  7447. (Text was entered in a window that had never been saved to disk, and
  7448. then the window was closed without saving. The context of this activity
  7449. has been lost for good.)
  7450.  
  7451. ____
  7452. ¶34
  7453. Wed Jan 20, 1993 9:59:51 pm OPEN «RenameTesttemp»
  7454. ¬
  7455. ¶35
  7456. Wed Jan 20, 1993 10:00:58 pm TYPING «RenameTesttemp» 1 37 (undone)
  7457. =>inserted 94 characters:
  7458. «
  7459. This text was typed into "Renametesttemp" and then undone.
  7460. The file was saved before closing.»
  7461. ¬
  7462. ¶36
  7463. Wed Jan 20, 1993 10:00:58 pm UNDO «RenameTesttemp»
  7464. ¬
  7465. ¶37
  7466. Wed Jan 20, 1993 10:01:01 pm SAVE «RenameTesttemp»
  7467. ¬
  7468. ¶38
  7469. Wed Jan 20, 1993 10:01:02 pm CLOSE «RenameTesttemp»
  7470. ¬
  7471. ____
  7472. (Here, the undone typing in “RenameTesttemp” was turned into a
  7473. permanent activity by the following save. Only permanent undone
  7474. activities are shown as “(undone)”.
  7475.  
  7476. ____
  7477. ¶47
  7478. Wed Jan 20, 1993 10:05:22 pm OPEN «Act1»
  7479. ¬
  7480. ¶48
  7481. Wed Jan 20, 1993 10:06:13 pm TYPING «Act1» 1 1
  7482. =>inserted 70 characters:
  7483. «This text was typed into "Act1", made permanent
  7484. by the following save.»
  7485. ¬
  7486. ¶49
  7487. Wed Jan 20, 1993 10:06:14 pm SAVE «Act1»
  7488. ¬
  7489. ¶50
  7490. Wed Jan 20, 1993 10:06:17 pm CLOSE «Act1»
  7491. ¬
  7492. ____
  7493. (The typical case, activities that are made permanent by saving to
  7494. disk. There is no special indication for permanent activities, this
  7495. being the default class).
  7496.  
  7497. A permanent activity is there right now in your disk file or on-screen,
  7498. and you could, with a bit of work, undo it using the information in
  7499. the “••Recent Activities••” window—provided you can untangle it from
  7500. the effects of other permanent activities that followed it. An undone
  7501. activity was explicitly undone and the result saved, but you could redo
  7502. it in the same way you would undo a permanent activity. A temporary
  7503. activity wasn’t saved, but you could, with a bit of work, redo it using
  7504. the information in the “••Recent Activities••” window—provided you can
  7505. untangle it from the effects of other temporary activities that
  7506. preceded it. An obsolete activity no longer has a meaningful context:
  7507. the window or file in which it occurred no longer exists on screen or
  7508. disk, though if it was in a file you might have a backup version
  7509. somewhere.
  7510.  
  7511.  
  7512. §    Updated file names
  7513. When you edit a file and then use Save As to save it under a different
  7514. name, those preceding edits really apply to the file with the new name
  7515. rather than to the old name. As a typical example, when you open a new
  7516. window “Untitled-3”, type in it a bit, and then save it as
  7517. “FileCommands.c”, you will later remember the typing as being
  7518. associated with the name “FileCommands.c” rather than “Untitled-3”.
  7519. In the “••Recent Activities••” window, the file name for the typing
  7520. would be shown as “FileCommands.c”.
  7521.  
  7522. When you use Save As on a file, or Save a window for the first time,
  7523. the file name for preceding activities associated with the old name
  7524. will be updated to the new name. This updating is applied backwards
  7525. to the point where you opened or saved the affected document (or all
  7526. the way back if those activities are too old to be still recorded).
  7527.  
  7528.  
  7529.  
  7530. §    Reviewing activities
  7531. If you anticipate wanting to jump to a file that contains a particular
  7532. edit, in order to view it in context, click the “updated current
  7533. positions” while viewing the Show Activities dialog, so that the line
  7534. and characters positions shown will correspond to current actual
  7535. positions in your files (to the extent that this is possible). If you
  7536. just intend to skim through the activities without jumping to any
  7537. files, selecting the “originally recorded positions” button will speed
  7538. up the process of showing you your activities, at the expense of
  7539. showing you file positions that are uncorrected for other activities.
  7540.  
  7541. With the  “••Recent Activities••” window in front, you can use Find
  7542. to search for activities in the usual way. Here are some (rather
  7543. obvious) things you can search for:
  7544.     •    activity number, such as “¶314” (¶ is <Option><seven>)
  7545.     •    date, such as “Jan 13”
  7546.     •    time, such as “ 10:51” (put a space before the hour:minute to
  7547.         disambiguate it from minute:second)
  7548.     •    activity name, such as “START OF SESSION”
  7549.     •    file name (note including the European quotes «» sometimes helps)
  7550.     •    contents of an insert or delete
  7551.  
  7552. For activities with file positions, such as inserts and deletes and
  7553. search results, you can jump to the file and line by clicking on
  7554. the line with the file-line reference, and then picking “Go to”.
  7555. For example, given
  7556. ____
  7557. ¶60
  7558. Sat Jan 16, 1993 10:51:48 pm PASTE «hAWK_FilesandClip.c» 390 4
  7559. ...etc
  7560. ____
  7561. to open a window for hAWK_FilesandClip.c  and jump to line 390,
  7562. position 4 on the line, click somewhere on the line (for example,
  7563.  after the ‘»’…)
  7564.  
  7565.  
  7566.  
  7567. …and then pick “Go to”. For more details, see the “‘Go’ commands” chapter
  7568.  
  7569. With this use or any use of “Go to”, the file must be listed in one of
  7570. your project panes.
  7571.  
  7572. If you have selected the “updated current positions” version of your
  7573. activities, the “Go to” command will work reasonably well—in fact, it
  7574. will work as well as it possibly can. For example, if you
  7575. paste some text at line 100, and then paste in 10 lines at line 50,
  7576. then the position of the first paste will be updated from line 100 to
  7577. line 110, because that’s where you would find it if you went looking
  7578. for it now—provided it was a permanent activity. If you didn’t save
  7579. the file, thus rendering the activities temporary, then the updated
  7580. position of the first paste would still be line 100, because the
  7581. influence of the second paste was removed by virtue of not saving it.
  7582. In other words, to redo that first temporary paste, you would still
  7583. go to line 100.
  7584.  
  7585. The limit to which edit positions can be meaningfully updated shows
  7586. up for example when you delete a large chunk of text, and that deleted
  7587. chunk contained earlier inserts or deletes. If you paste some text at
  7588. line 100, and then delete lines 50 through 200, what should be the
  7589. updated position of the paste? EnterAct will show the updated position
  7590. as line 50, which, if you think about it, is the best that can be
  7591. done.The positions of obsolete activities are not updated, there being
  7592. no file or window to which the activity can be currently related.
  7593.  
  7594. §    Selective single undo
  7595. By selecting “updated current positions” when showing your activities,
  7596. you stand a very good chance of being able to identify the exact
  7597. current position of any previous insert or delete. However, the updated
  7598. position will not be terribly meaningful if the insert or delete was
  7599. later “engulfed” by a delete (for example a paste on line 100 followed
  7600. by deleting lines 50 through 200). And if the activity was an insert
  7601. that was later “nibbled at” by small inserts and deletes within the
  7602. original insert, you may find that you have to undo several activities
  7603. instead of one, or at least mentally compensate for them.
  7604.  
  7605. Once you have found the activity in the recent activities window, use
  7606. “Go to” to jump to the current position for the activity, as described
  7607. in the section above. If it still seems appropriate for undoing after
  7608. viewing it in context, the procedure for actually undoing it is, alas,
  7609. devoid of novelty:
  7610.     •    to undo an insert, identify the range of the insert in your document
  7611.         by comparing your document with the text of the insert as shown in your
  7612.         activity record; then select it and clear it out
  7613.     •    to undo a delete, copy the deleted text from your activity record
  7614.         and then paste it into your document at the current position for the
  7615.         activity.
  7616.  
  7617. If you have edited the document in question with some editor besides
  7618. EnterAct, the contents and positions of recorded activities may not
  7619. be entirely accurate. But if the edits elsewhere were small, you should
  7620. be able to compensate for them and still achieve the undo you want.
  7621.  
  7622. The recent activities window does not update as you make changes.
  7623. To force an update of positions and activities, close the window
  7624. and reopen it.
  7625.  
  7626. §    Reverting a file
  7627.  
  7628. >    Introduction
  7629. The procedure for reverting a file to an earlier form based on your
  7630. recorded activities is a bit lengthy, so step-by-step instructions are
  7631. given below. In order to revert a file you need to specify the file,
  7632. and how far back you want to go when reverting the file. The “how far
  7633. back” part is specified by an activity number from your “••Recent
  7634. Activities••” window, so you’ll need to Show Activities (with original
  7635. positions) to identify the right activity number. The actual revert
  7636. is done with the supplied hAWK program “$Multi_Undo”, and to provide
  7637. the needed input for this program you’ll save your “••Recent
  7638. Activities••” window to disk, then add it to an EnterAct project. The
  7639. file you wish reverted must also be added to the same project. The
  7640. reverted file will be presented to you in the “$tempStdOut” window when
  7641. $Multi_Undo is finished, to do with as you wish.
  7642.  
  7643. EnterAct doesn't do version control, and this reversion process, in
  7644. its present inelegant form, should be used in emergencies only.
  7645. It works, but that's all you can say for it.
  7646.  
  7647. >    Limitations
  7648. In order to revert a file (called file A below), several conditions
  7649. must be met:
  7650.     •    file A has been saved since its contents were last changed
  7651.     •    All changes to file A, from to the undo point up to the present,
  7652.         have been made with EnterAct
  7653.     •    From the undo point up to the present, no other file named "A" has
  7654.         been edited with EnterAct (ie a different disk or folder, but the same
  7655.         basic file name A)
  7656.     •    The activity corresponding to the undo point is present in
  7657.         EnterAct's "••Recent Activities••" window (it goes back up to 10,240
  7658.         activities).
  7659.     •    The entire text of each edit on file A is present in "••Recent
  7660.         Activities••": you normally won't want to check for this yourself, and
  7661.         the hAWK program “$Multi_Undo”, which you’ll be using anyway, will do
  7662.         it thoroughly for you. In general, only inserts or deletes below 64K
  7663.         characters are fully recorded, and older large edits near the beginning
  7664.         of "••Recent Activities••" may not be fully recorded if it was
  7665.         necessary to make room for newer large edits, due to the total data
  7666.         limit of 1.3Meg characters. Rule of thumb: barring a sequence of large
  7667.         edits, all of your edits will still be fully recorded. These size
  7668.         limits are only rarely encountered.
  7669.  
  7670. The reverted version of your file presented in “$tempStdOut” will not
  7671. retain any markers or illustrations from the original. Normally,
  7672. markers can be easily replaced with the Automark command. To reinstate
  7673. illustrations, you’ll need to use your resource editor to copy the
  7674. appropriate PICT’s.
  7675.  
  7676.  
  7677. >    How to revert a file
  7678. If your circumstances meet the above conditions, you can revert a file
  7679. (still called “A”) by following these steps:
  7680.     •1    Open an EnterAct project (any will do)
  7681.     •2    If necessary, add file A to it
  7682.     •3    Select "Show Activities..."; click on the "originally recorded
  7683.     positions" button; and for the number of activities to show, enter
  7684.     "10240"; and click the OK button to generate the "••Recent Activities••"
  7685.     window
  7686.     •4    Locate the oldest activity you wish undone, and note its activity
  7687.     number -- this appears just afer the "¶" beginning the activity record,
  7688.     for example "¶314"
  7689.     •5    Save "••Recent Activities••" somewhere - NOTE the name must start
  7690.     with two bullets, but is otherwise arbitrary, for example, "••RA" or
  7691.     "••For undo". The bullet character is <Option><eight>.
  7692.     •6    Add your saved version of "••Recent Activities••" to your project,
  7693.     then close the window for "••Recent Activities••" to save memory
  7694.     •7    Select both the saved version of "••Recent Activities••" and file
  7695.     A for MFS operations, by holding down the <Option> key and clicking
  7696.     on each name in the project window - a bullet • will appear beside the
  7697.     file name). These two should be the only files marked with a • in your
  7698.     project window
  7699.     •8    Call up hAWK and select the supplied program “$Multi_Undo”; the
  7700.     input option should be "MFS selected files"; use "Set Variables" to
  7701.     set the value of the variable "howFarBack" to the activity number that
  7702.     represents how far back (inclusive) you wish to undo. For example,
  7703.              howFarBack=314
  7704.     to undo from the present (the largest activity number) back to and
  7705.     including activity number 314.
  7706.     •9    Click the Run button. The undone version of file A will (eventually)
  7707.     be presented in the "$tempStdOut" window. You can continue working in
  7708.     EnterAct in the meantime.
  7709.     •10    Save "$tempStdOut" under a different name if you wish to keep the
  7710.     results (see “Preserving the undone version” just below for an
  7711.     explanation)
  7712.     •11    If there are other files you wish to restore, add them to your
  7713.     project if necessary, open your saved version of "••Recent
  7714.     Activities••" to determine how far back to undo, then close it and
  7715.     repeat steps 7-10 (especially step 10).
  7716.  
  7717. While you're waiting for $Multi_Undo to finish you should avoid editing
  7718. either file A or your saved version of "••Recent Activities••".
  7719.  
  7720. For more information on running hAWK programs see 
  7721. the “hAWK User’s Manual” supplied on disk.
  7722.  
  7723.  
  7724. >    Preserving the undone version
  7725. The “$Multi_Undo” program stops one step short of actually reverting
  7726. your file, in that the reverted version is contained in the file
  7727. “$tempStdOut” at the end, rather than immediately replacing the
  7728. contents of your file. If you decide to keep the reverted version, you
  7729. can use Save As  on “$tempStdOut” to create a permanent copy of the
  7730. reverted file. You should do this before your next hAWK or Read
  7731. Resource run, because the file “$tempStdOut”, as its name suggests,
  7732. is overwritten with every Drag_on Module run.
  7733.  
  7734. If you use Save As to replace your file A with the reverted version,
  7735. this will not be undoable, and the unreverted version will be lost.
  7736. If you’re not absolutely sure that the reverted version should replace
  7737. the unreverted version, it’s best to give the reverted version a name
  7738. name that is close to the old one (eg the reverted version of
  7739. “MyEvent.c” could be called “MyEvent2.c” or “MyEvent_r1.c” etc).
  7740.  
  7741.  
  7742. §    Turning activity recording on and off
  7743.  
  7744. >    Temporarily
  7745. When activities are being recorded you will see a menu item named
  7746. Recording activities under the Edit menu: it will change to read Not
  7747. recording activities if you select it, indicating that recording is
  7748. turned off. Selecting it again will turn recording back on. Even if
  7749. you are not recording activities, EnterAct will still open the log file
  7750. “EnterAct Recent Activities” each time you start EnterAct, creating
  7751. it if it is not found. And you will still be able to Show Activities.
  7752.  
  7753. Turning activity recording off temporarily is rarely useful. However,
  7754. you might consider it if you are about to perform a number of trivial
  7755. changes, or very large edits that you don’t need recorded, and want
  7756. to preserve the current record of your activities as much as possible.
  7757. But if you are aware that vitally important data exists only in your
  7758. recorded activities, it would be better to Show Activities and Save
  7759. the resulting activity list to disk, to avoid losing the data as older
  7760. activities are dropped from the log file.
  7761.  
  7762.  
  7763. >    More permanently
  7764. The “master switch” for EnterAct’s activity recording is in the Options
  7765. dialog (under the Edit menu). 
  7766.  
  7767. You may wish to forego the recording of your activities if you don’t
  7768. have enough disk space available to hold the log file (2.1Meg), or if
  7769. your hard disk makes so much noise that you can’t work when it’s
  7770. active.  To turn off activity recording, and also instruct EnterAct
  7771. not to look for or create the “EnterAct Recent Activities” log file,
  7772. uncheck the “Save activities to disk” option in the Options dialog and
  7773. click the OK button: as you do so, the icon of the log file will be
  7774. crossed out, indicating that the file will no longer be needed or used.
  7775. You may then dispose of the log file if you wish, and EnterAct will
  7776. not complain.
  7777.  
  7778.  
  7779.  
  7780.  
  7781.  
  7782.  
  7783.  
  7784.  
  7785.  
  7786.  
  7787.  
  7788.  
  7789.  
  7790.  
  7791.  
  7792.  
  7793.  
  7794.  
  7795.  
  7796.  
  7797.  
  7798.  
  7799.  
  7800. To reactivate activity recording, check the “Save activities to disk”
  7801. option in the Options dialog and click OK. A log file will immediately
  7802. be created if one does not exist at the time. If the log file exists,
  7803. recording will pick up again with no loss of previously recorded
  7804. activities.
  7805.  
  7806.  
  7807. -    -    -    -    -    -    -    -    -    -    -    -
  7808. “Index” commands
  7809. -    -    -    -    -    -    -    -    -    -    -    -
  7810.  
  7811. PLEASE NOTE the index commands "Functions", "Cross-Reference",
  7812. "Potential Locals" and "Check Prototypes" are intended for use
  7813. with C code only (not C++ or Java).
  7814.  
  7815.  
  7816.  
  7817.  
  7818.  
  7819.  
  7820.  
  7821.  
  7822.  
  7823.  
  7824.  
  7825.  
  7826.  
  7827.  
  7828.  
  7829.  
  7830.  
  7831.  
  7832.  
  7833.  
  7834.  
  7835.  
  7836.  
  7837.  
  7838.  
  7839.  
  7840.  
  7841.  
  7842.  
  7843.  
  7844.  
  7845.  
  7846. The “Index” commands under the EnterAct menu generate a variety of
  7847. reports on your source code. With all except the Potential Locals
  7848. and Check Prototypes command, set up a multi-file selection first
  7849. to serve as input for the command. Potential Locals takes a function
  7850. body with parameters as input. Check Prototypes looks at all of
  7851. the function definitions and prototypes in your entire project.
  7852. All output from these commands is to $tempStdOut.
  7853.  
  7854. Functions… builds a list of functions in your selected files: it can
  7855. list functions defined in the files together with sublists of the
  7856. functions that each defined function calls, or conversely you can have
  7857. a list of all the functions called in your source code, together with
  7858. sublists showing which functions call them.
  7859.  
  7860. Cross-Reference… generates a cross-reference listing: you can specify
  7861. the types of term (function, struct, variable etc) to include, the
  7862. specific terms to look for (your current dictionary), and the files
  7863. to look in (your current multi-file selection). Supporting doc files
  7864. in your rightmost project pane can be included in the cross-reference.
  7865. You can also specify a list of common words (such as Handle) to skip
  7866. for cross-reference purposes.
  7867.  
  7868. #Includes and Marker Names generate lists of system or user headers,
  7869. and marker names in a variety of formats, in your selected files.
  7870.  
  7871. Potential Locals classifies and lists all terms in a function. Just
  7872. before this command, select the entire body of the function and the
  7873. parameters (ie from the opening ‘(’ of the parameters to the closing
  7874. ‘}’ of the function, inclusive). In the resulting list, names that have
  7875. no definition and are not parameters, and hence are probably local
  7876. variables, are listed first. The number of times each name was used
  7877. is also listed, and by comparing this list with your original function
  7878. you can quickly declare all necessary variables or eliminate
  7879. unnecessary declarations, and also spot spelling mistakes.
  7880.  
  7881. Standard Metrics issues counts of lines and characters in selected
  7882. files, and also shows character frequencies.
  7883.  
  7884. Check Prototypes is rather primitive, catching only a difference
  7885. in the number of parameters to a function. No need to bullet any
  7886. files, just bring your dictionary up to date beforehand. It's intended
  7887. for use with C source only, not C++ or Java.
  7888.  
  7889.  
  7890. §    Functions…
  7891. For use with C source only.
  7892.  
  7893.  
  7894.  
  7895.  
  7896.  
  7897.  
  7898.  
  7899.  
  7900.  
  7901.  
  7902.  
  7903.  
  7904.  
  7905.  
  7906. This command can be used to build a “skeleton” for selected source
  7907. files, a bare list of functions defined together with the functions
  7908. they call. It also works in reverse, and can be used to list all
  7909. functions that are called, together with sublists of the functions that
  7910. call them. Input is taken from your list of files selected for
  7911. multi-file operations (use the Find dialog buttons, or <Option>click
  7912. in the project window, see the “Search” chapter). Only files in the
  7913. left and middle project window panes will be looked at, and any files
  7914. you select in the right (documentation) pane will be ignored. You’ll
  7915. see results in “$tempStdOut”: if you decide you want to save the
  7916. results permanently, use Save As to save this document under a new name
  7917. of your choice, since the contents of $tempStdOut are overwritten by
  7918. every Index command or Drag_on Module run.
  7919.  
  7920. For proper results, your dictionary should be reasonably up to date
  7921. before using this command. In particular, your dictionary should
  7922. contain entries for all functions that you wish to see listed. For
  7923. example, in order for toolbox functions to show up in the listing
  7924. you’ll need to add the appropriate toolbox headers to your project and
  7925. update your dictionary.
  7926.  
  7927. When you select “with calls” in the Functions dialog, the main list
  7928. in the result will consist of functions defined in your list of source
  7929. files. Indented under each defined function will be a list of functions
  7930. called by the defined function. If you select “as defined” then
  7931. function definitions will be listed in the order encountered in your
  7932. source files, with a comment containing the file name beginning each
  7933. list for each file:
  7934.  
  7935.  
  7936.  
  7937.  
  7938.  
  7939.  
  7940.  
  7941.  
  7942.  
  7943.  
  7944.  
  7945.  
  7946.  
  7947.  
  7948.  
  7949.  
  7950.  
  7951.  
  7952.  
  7953.  
  7954.  
  7955.  
  7956.  
  7957.  
  7958.  
  7959.  
  7960.  
  7961. If you select "sorted” then all of the function definitions from all
  7962. files will be sorted alphabetically. In this case you can select
  7963. “include file locations” to list the defining file for each function:
  7964.  
  7965.  
  7966.  
  7967.  
  7968.  
  7969.  
  7970.  
  7971.  
  7972.  
  7973.  
  7974.  
  7975.  
  7976.  
  7977.  
  7978.  
  7979.  
  7980.  
  7981.  
  7982.  
  7983.  
  7984.  
  7985.  
  7986.  
  7987.  
  7988.  
  7989.  
  7990.  
  7991. If you select “with callers” the resulting list will show all functions
  7992. that are called in your source code, with an indented sublist for each
  7993. naming the functions that call it. Here also, if you select “include
  7994. file locations” then the defining file name will be listed with each
  7995. function name.
  7996.  
  7997.  
  7998.  
  7999.  
  8000.  
  8001.  
  8002.  
  8003.  
  8004.  
  8005.  
  8006.  
  8007.  
  8008.  
  8009.  
  8010.  
  8011.  
  8012.  
  8013.  
  8014.  
  8015.  
  8016.  
  8017.  
  8018.  
  8019.  
  8020.  
  8021.  
  8022.  
  8023. With any function name, you can jump to the definition for it by
  8024. <Option> double-clicking on the name. File names in the listings are
  8025. enclosed in «» quotes: to open a file, click anywhere on the line
  8026. containing the file name and issue a “Go to”.
  8027.  
  8028.  
  8029. §    Cross-Reference…
  8030. For use with C source only.
  8031.  
  8032.  
  8033.  
  8034.  
  8035.  
  8036.  
  8037.  
  8038.  
  8039.  
  8040.  
  8041.  
  8042.  
  8043.  
  8044.  
  8045.  
  8046.  
  8047.  
  8048.  
  8049.  
  8050.  
  8051.  
  8052.  
  8053.  
  8054.  
  8055.  
  8056.  
  8057.  
  8058.  
  8059.  
  8060.  
  8061.  
  8062.  
  8063.  
  8064. The Cross-Reference command generates a cross-reference for all term
  8065. types you select, in all files selected for multi-file operations.
  8066. Names are listed in alphabetical order, with a sublist for each name
  8067. listing file name and line number for each instance, and optionally
  8068. the name of the function containing the instance. Only names that are
  8069. defined in your current project dictionary will be included in the
  8070. listing. Note that you can cross-reference supporting documents with
  8071. this command, by putting a bullet (•) beside the name of each
  8072. supporting document. The “include containing function names” option
  8073. will be ignored for support docs.
  8074.  
  8075. To generate a cross-reference just for names that are defined in
  8076. certain files, rather than all names defined in your current dictionary
  8077.     •    make a new project, and add to it only those source and header files
  8078.         which contain functions, variables, structs etc to be included in the
  8079.         cross-reference
  8080.     •    use Update Dictionary to build a dictionary for just those names
  8081.     •    add any additional files to be cross-referenced to your project
  8082.     •    place bullets (•) beside the names of all files you want to
  8083.         cross-reference
  8084.     •    select Cross-Reference
  8085.     •    optionally specify a file containing a list of common words to skip,
  8086.         with the “Skip words in…” button
  8087.     •    specify the term types (function, variable etc) to be included in
  8088.         the cross-reference, or click the “All types” button
  8089.     •    click OK and your desired list will appear in the $tempStdOut window
  8090.  
  8091. Normally your current project dictionary will be the appropriate one
  8092. to use for cross-referencing, and you won’t need to make a new project
  8093. just for this purpose.
  8094.  
  8095. As with all Index commands, use Save As to save $tempStdOut under a
  8096. different name if you decide to keep the results—$tempStdOut will be
  8097. overwritten by your next Index command or hAWK run.
  8098.  
  8099. The “Skip words in…” button in the Cross-Reference dialog allows you
  8100. to specify a list of words to skip, typically common names such as OK,
  8101. Handle, DialogPtr that you aren’t interested in. The names in the file
  8102. can appear in any order, and can be separated from one another by
  8103. spaces or <Return>’s. The file “Skip for XRef” which comes with
  8104. EnterAct contains a starter list. You’ll find it in the “hAWK Programs”
  8105. folder, which is inside the “Drag_on Modules” folder inside your
  8106. development folder.
  8107.  
  8108.  
  8109.  
  8110.  
  8111.  
  8112.  
  8113.  
  8114.  
  8115.  
  8116.  
  8117.  
  8118.  
  8119.  
  8120.  
  8121.  
  8122.  
  8123.  
  8124.  
  8125.  
  8126.  
  8127.  
  8128.  
  8129.  
  8130.  
  8131.  
  8132.  
  8133.  
  8134.  
  8135.  
  8136.  
  8137.  
  8138.  
  8139.  
  8140.  
  8141.  
  8142.  
  8143.  
  8144.  
  8145.  
  8146. To cancel the use of a skip-list, click the “Skip none” button.
  8147. When you select “include containing function names” the name of the
  8148. function, if any, containing each reference will be shown to the right
  8149. of each reference. Names which occur outside of a function body,
  8150. including all names encountered in support documents, will not have
  8151. a containing function listed.
  8152.  
  8153. The format of each reference such as
  8154. ____
  8155.     «AssocArray.c»        260        SetArrayValue
  8156. ____
  8157.  is «file name» line-number containing-function (if any). To go to a
  8158.  particular reference, click on the reference line and use “Go to”. To
  8159.  jump to the definition of a containing function, <Option> double-click
  8160.  on its name.
  8161.  
  8162.  
  8163. §    #Includes…
  8164.  
  8165.  
  8166.  
  8167.  
  8168.  
  8169.  
  8170.  
  8171.  
  8172.  
  8173.  
  8174.  
  8175.  
  8176.  
  8177.  
  8178.  
  8179.  
  8180.  
  8181.  
  8182.  
  8183.  
  8184.  
  8185.  
  8186.  
  8187.  
  8188.  
  8189. To list header files that are included in one or more source or header
  8190. files:
  8191.     •    select the source and header files for multi-file operations
  8192.     •    select the #Includes… command
  8193.     •    pick either system headers with the <headers> button, or
  8194.         project-specific headers with the “headers” button, or both
  8195.     •    click OK, and the list will appear in the $tempStdOut window
  8196.     •    use Save As on $tempStdOut to make a permanent copy of the results.
  8197.  
  8198. Included file names are listed in the order encountered, together with
  8199. line number.
  8200.  
  8201.  
  8202. §    Marker Names…
  8203.  
  8204.  
  8205.  
  8206.  
  8207.  
  8208.  
  8209.  
  8210.  
  8211.  
  8212.  
  8213.  
  8214.  
  8215.  
  8216.  
  8217.  
  8218.  
  8219.  
  8220.  
  8221.  
  8222.  
  8223.  
  8224.  
  8225.  
  8226.  
  8227.  
  8228.  
  8229.  
  8230.  
  8231. To list the names of all markers in one or more files:
  8232.     •    select the files (any panes) for multi-file operations
  8233.     •    select the Marker Names… command
  8234.     •    pick your preferred format for the names
  8235.     •    click OK, and the list will appear in the $tempStdOut window
  8236.     •    use Save As on $tempStdOut to make a permanent copy of the results.
  8237.  
  8238. The «file-name»«marker-name» format is useful for establishing “go to”
  8239. links, as explained in the “‘Go’ commands” chapter. The other two
  8240. formats can also be used as “go to” links, but work only within the
  8241. file that contains the marker.
  8242.  
  8243. EnterAct's default behavior is to NOT save marks with source or
  8244. header files, so there will normally be no marks listed for these
  8245. files. In practise you will probably not need special  “go to” links
  8246. for functions or structs anyway, since <Option>double-clicking
  8247. on the name anywhere will take you to the definition. “Go to” links
  8248. are intended mainly for establishing hyperlinks to documentation
  8249. files (this manual is already redundant enuff, so please see chapter 17
  8250. for details on creating and using «file-name»«marker-name» links).
  8251.  
  8252. §    Potential Locals
  8253. For use with C source only.
  8254.  
  8255.  
  8256.  
  8257.  
  8258.  
  8259.  
  8260.  
  8261.  
  8262.  
  8263.  
  8264.  
  8265.  
  8266.  
  8267.  
  8268.  
  8269.  
  8270.  
  8271.  
  8272.  
  8273.  
  8274.  
  8275.  
  8276.  
  8277.  
  8278.  
  8279.  
  8280.  
  8281.  
  8282.  
  8283.  
  8284.  
  8285.  
  8286.  
  8287.  
  8288.  
  8289.  
  8290.  
  8291.  
  8292.  
  8293.  
  8294.  
  8295. This command helps with the declaration of local variables. To use it,
  8296. first select the parameters and body of a function, from the opening
  8297. parenthesis of the parameters to the closing curly brace of the
  8298. function body, inclusive, as shown above left. Then select Potential
  8299. Locals:results will be shown in $tempStdOut.
  8300.  
  8301. Names are shown three per line, each followed by the number of times
  8302. the name was encountered in the function. The first list, “These look
  8303. most like locals:”, consists of those names seen in the function which
  8304. have no entries in your current dictionary, and hence they are the best
  8305. candidates to be local variables. Note, though, that they could also
  8306. be goto labels, or names that for some reason are not defined in your
  8307. dictionary. Names in this list with a frequency of 1 bear a close
  8308. look—often they have been used but not declared, or declared but not
  8309. used, or the name has a typo. Names in the other lists might also need
  8310. declaration as local variables, if you have used the same name for a
  8311. local and something else (such as a global variable, typically).
  8312.  
  8313.  
  8314. §    Standard Metrics
  8315. This command reports the total lines and characters in each of your
  8316. files selected for multi-file operations, followed by a C-style array
  8317. listing the number of times each character was seen. Comment characters
  8318. and lines are included in the totals, but blank lines at the end of
  8319. a file aren’t counted as lines.
  8320.  
  8321.  
  8322.  
  8323.  
  8324.  
  8325.  
  8326.  
  8327.  
  8328.  
  8329.  
  8330.  
  8331.  
  8332.  
  8333.  
  8334.  
  8335.  
  8336.  
  8337.  
  8338.  
  8339.  
  8340.  
  8341.  
  8342.  
  8343.  
  8344.  
  8345.  
  8346. §    Check Prototypes
  8347. For use with C source only.
  8348.  
  8349. This command checks all of the function definitions and
  8350. prototypes in your project dictionary, checking ONLY the
  8351. number of parameters for each function. It reports the
  8352. names of any functions that are declared with different
  8353. numbers of parameters. Before calling this command, you
  8354. should bring your dictionary up to date with Update Dictionary
  8355. for best results.
  8356.  
  8357. There is no need to select any files for multi-file operations
  8358. when using this command. You just need a project open with
  8359. a built dictionary.
  8360.  
  8361. This is a primitive version, and catches only differences in the
  8362. NUMBER of parameters to a function. And it's only for C files, not
  8363. C++ or Java. Don't trust it to validate prototypes, use it only
  8364. to spot the particular problem of the same-named
  8365. C function having a different number of parameters in
  8366. variant declarations. This typically happens when you change
  8367. the definition of a function and forget to change a prototype
  8368. for it in a different file.
  8369.  
  8370. If no prototypes are shown in stdout, your function definitions
  8371. and declarations all had a consistent number of parameters.
  8372. Or arguments, if you prefer. I won't argue.
  8373.  
  8374. -    -    -    -    -    -    -    -    -    -    -    -
  8375. Some thoughts on using EnterAct
  8376. -    -    -    -    -    -    -    -    -    -    -    -
  8377. (Worth mentioning again, EnterAct can be used as just a
  8378. "definition viewer" to help out other editors -- see
  8379. the end of "Lookup", chapter 10)
  8380.  
  8381. (As of September 95, the advice below about how to avoid lookup
  8382. delays and minimize memory use is sounding a bit dated; however,
  8383. it's still true that smaller projects are easier to manage.)
  8384.  
  8385. §    Projects are cheap
  8386. EnterAct projects are quick and easy to create, the only real penalty
  8387. being the amount of disk space used. While an EnterAct project can be
  8388. truly enormous and still be usable, lookup will be faster and more
  8389. appropriate if you tailor your project to the problem at hand. As an
  8390. extreme example, here’s a generic project that would be perfectly
  8391. suitable for developing file–handling functions:
  8392.  
  8393.  
  8394.  
  8395.  
  8396.  
  8397.  
  8398.  
  8399.  
  8400.  
  8401.  
  8402. Lookup in this size project will always be instantaneous no matter how
  8403. bad your spelling, and lookup for your terms will never be confused
  8404. by accidental matches against terms in files that you don’t need
  8405. reference to. While accidental matches are not common, the speed of
  8406. lookup when your spelling is not exact does depend directly on the size
  8407. of your dictionary.
  8408.  
  8409. At the other extreme, you can create projects with files from more
  8410. that one application/driver etc. This can be very handy for comparing
  8411. different versions or different approaches to a problem. In practise,
  8412. the main penalty comes when you want to jump to a particular
  8413. definition, and there's more than one: to choose the one you want,
  8414. you have to press <Enter> to look it up and then <Option>double-click
  8415. in the lookup window.
  8416.  
  8417. The rule of thumb then is that an EnterAct project can consist of
  8418. whatever files you want, but performance will be better if you don’t
  8419. add files that you don’t need. There is a tradeoff between having
  8420. absolutely everything of potential interest in a large, complicated
  8421. project, and having several smaller but better–performing projects.
  8422.  
  8423. For ultra-compact project backup, in the event that some of your
  8424. projects are tedious to create:
  8425.     •    select all of the files in your project for multi-file ops, by
  8426.     clicking the "All" button in the Find dialog
  8427.     •    select hAWK from the EnterAct menu, and select and run
  8428.     the program "$EchoFullPathNames"
  8429.     •    use Save As on the resulting stdout window to save your
  8430.     list of project files
  8431.     •    to recreate your project: create a New Project; hold
  8432.     down the <Shift> key while selecting "Add Files..." (the menu
  8433.     text will read "Add Files from List...") and select your text
  8434.     file of full path names in the subsequent Open dialog; and
  8435.     bring your dictionary up to date after the files are added.
  8436.  
  8437. §    Learning from or reviewing code
  8438. If your purpose is to explore rather than create, then you won’t be
  8439. typing in many incorrect spellings. Lookup when spelling is correct
  8440. is always instant, which is the case if you’re just reading through
  8441. code and looking up terms in the code as you go. In this case the only
  8442. restrictions on the size of the project are the amount of disk space
  8443. and RAM needed, and you can add absolutely all files related to the
  8444. application without slowing down the lookup.
  8445.  
  8446. (Strictly speaking, lookup is instant only for terms with entries
  8447. in your dictionary. Specifically, struct and class member names
  8448. are not separately entered in your dictionary, and it can take
  8449. a second or more for the AutoLook window to pull up a definition
  8450. that contains the member name. Sorry, there's no plan to speed
  8451. up member lookup. Member lookup won't hang you up, it will just
  8452. be stopped if you start typing or mousing around during the search.)
  8453.  
  8454. §    On documenting your work
  8455. There is little in this manual on the topic of documentation, primarily
  8456. because it’s up to you how, and how much, you document your work in
  8457. separate files. But it’s worth mentioning that EnterAct has a variety
  8458. of features to help you create and maintain your documentation. Here’s
  8459. a list:
  8460.     •    documentation files can be added to the rightmost pane of your
  8461.         project, for regular double-click access just like source and header
  8462.         files
  8463.     •    <Option> double-click or Find Definition can be used on any term
  8464.         that appears in your documentation to jump to its definition (provided
  8465.         of course that your dictionary is reasonably up-to-date)
  8466.     •    the AutoLook window will instantly update to display definitions
  8467.         of terms in your documentation (double-click on the term or click just
  8468.         after it). And clicking after a term and pressing the <Enter> key will
  8469.         produce a more persistent separate lookup window
  8470.     •    your own notes on various programming topics can be “disguised” as
  8471.         C terms, and in this form they can be built into your project
  8472.         dictionary for instant retrieval to the AutoLook window or a separate
  8473.         lookup window wherever the name of the note appears (see “Looking up
  8474.         your notes” in the “Lookup” chapter)
  8475.     •    “Go to” accepts file name followed by marker name, as explained in
  8476.         the “‘Go’ commands” chapter. These look like
  8477.         /* See «MY OOP Notes» «Static variables» */
  8478.         and the text for them can be generated by picking the marker from
  8479.         the popup menu in the document where it is defined while holding down
  8480.         the <Shift> key as well as the usual <Option> or <Command> key. The
  8481.         link location is maintained as you edit, since the marker’s location
  8482.         is maintained, and if the file and marker names are in «» quotes
  8483.         they can be abbreviated or even slightly incorrect and still work.
  8484.     •    “Go to” also accepts file-name and/or line-number selections. Text
  8485.         for this style of “go to” link is generated by the Show Activities
  8486.         command, and by a variety of supplied hAWK programs. For an example
  8487.         of line numbers used to index a document, see the “Active Index” at
  8488.         the bottom of the “hAWK User’s Manual” on disk 2.
  8489.     •    Reformat Selection can be used to even up the lines in one or more
  8490.         paragraphs of your documentation
  8491.     •    if you have any relevant PICT files, you can add them to your
  8492.         project for quick access. And “Go to” accepts PICT file names. You can
  8493.         also add one or more PICT’s as illustrations in a TEXT document (see
  8494.         “Illustrating your text” in the “Editing” chapter).
  8495.     •    the hAWK program "$CompareFiles" can be run on any two of your
  8496.         project files to list differences.
  8497.  
  8498. EnterAct can track and link all of your supporting documentation. If
  8499. you develop naming conventions for your documents, and make use of some
  8500. of EnterAct’s linking power, you should find it’s a lot easier to keep
  8501. track of things. References will be just a double-click or “Go to” away,
  8502. which beats shuffling through a stack of papers or calling up an
  8503. accessory outliner all to heck (pardon the enthusiasm).
  8504.  
  8505. -    -    -    -    -    -    -    -    -    -    -    -
  8506. If there’s a problem
  8507. -    -    -    -    -    -    -    -    -    -    -    -
  8508. §    Out of memory
  8509. If you run out of memory while trying to do something, you’ll see an
  8510. Alert saying “Out of memory. Please close up and try again when things
  8511. are less busy.” or the equivalent. Open windows take up memory that
  8512. you can free by closing the window The project especially can
  8513. take a lot of memory (Megabytes), since the entire dictionary
  8514. associated with it is kept in memory.
  8515.  
  8516. If you encounter frequent “Out of memory” messages, the least
  8517. inconvenient but most expensive cure is to allow more memory for
  8518. EnterAct, which may involve buying some chips. However, you can
  8519. often free up a considerable amount of memory by removing relatively
  8520. unneeded files from your project. The rough rule is that your project
  8521. dictionary will take up in memory about one–half of the disk space
  8522. used by all .c and .h files in the project (a better estimate, 16% of
  8523. source files plus 120% of header files). If you don’t need lookup for any
  8524. of the terms in a .c or .h file, removing it from your project will free
  8525. up some memory. Note that plain text files in the rightmost pane do
  8526. not greatly affect memory used, since they are not incorporated into
  8527. the dictionary.
  8528.  
  8529. To see how much memory is free at any time, select Show Activities from
  8530. the Edit menu. At the bottom of the resulting dialog you will see the
  8531. amount of memory currently available. Or you can use "About This
  8532. Macintosh..." in the Finder, turn Balloon Help on, and point your mouse
  8533. at EnterAct in the dialog.
  8534.  
  8535. For a guide to estimating memory needs and trimming unneeded files from
  8536. your project, see the file “EnterAct memory needs”.
  8537.  
  8538.  
  8539. §    Dictionary problems
  8540. >    Missing dictionary entries
  8541. In rare cases, an error in your source may lead to a term not being
  8542. recorded in your dictionary, with no message. An example is
  8543. ____
  8544.     int x        /* missing semicolon */
  8545.     long y;
  8546. ____
  8547. for which EnterAct would record only the “y”, missing the “x”. This
  8548. is the one time that EnterAct’s tolerance of errors can be a nuisance,
  8549. but if you can remember where the term is defined then visual
  8550. inspection should reveal the error, typically a missing semicolon or
  8551. a missing or misspelled keyword. If you can’t remember where the term
  8552. is defined, and you really want lookup to be available for it, then
  8553. the one sure cure is to switch to THINK C and Compile or Check Syntax
  8554. until you spot and fix the bug.
  8555.  
  8556.  
  8557. >    Trouble building your dictionary
  8558. If the dictionary–builder trips over a bug in your code and you can’t
  8559. spot the problem after reading this section and examining your code,
  8560. your next best course of action is to switch to THINK C and compile
  8561. the offending file. If you call for technical support and your code
  8562. is not compilable, there is only a small chance we can help, since the
  8563. possibilities would be too open–ended. Look on the bright side, you’ll
  8564. have to compile your code sooner or later anyway. 
  8565.  
  8566. EnterAct sets moderately strict standards for the part of your code
  8567. that is outside of a function, struct, or union body. However, code
  8568. that is inside of a function, struct, or union body is primarily
  8569. checked only for proper balance in a few key delimiters, typically {},
  8570. (), and /* */. As a result, almost all of your first–draft errors will
  8571. be simply ignored. Some errors outside of a body can be compensated
  8572. for, and the remainder that do trigger a complaint from the
  8573. dictionary–builder will almost always be fairly obvious.
  8574.  
  8575. Here follows a complete list of the messages you might see after
  8576. selecting Update Dictionary or Update For Front File Only. 
  8577.  
  8578. ____
  8579. "Statement too complex to deal with all at once. Any chance you could
  8580. simplify?"
  8581. ____
  8582. This message should be rather rare. You would have to nest brackets
  8583. more than 200 deep, or have more than 256 enum constants in a single
  8584. enum in order to produce it. I’m not giving an example! The cure would
  8585. be to reduce the number of brackets in your deeply–nested construction,
  8586. or split a monstrous enum into two parts.
  8587.  
  8588. ____
  8589. "Typedef cannot have an init. One or the other has to go."
  8590.     typedef int SHORT = 7;
  8591. ____
  8592. This should prove rare. “typedef” essentially creates a new keyword,
  8593. and you can no more initialize it than you could initialize “int”
  8594. itself. Apologies for stating the obvious.
  8595.  
  8596. ____
  8597. "Illegal word or punctuation after struct or union."
  8598.     struct int myStruct {...     /* int */
  8599.     struct /myStruct {...        /* the '/' */
  8600.     struct myStruct (...}        /* wrong bracket */
  8601. ____
  8602. Something between “struct” or “union” and the opening left brace (if
  8603. any) of the body doesn’t belong. Or, you may have neglected to type
  8604. in a name for the struct or union.
  8605.  
  8606. ____
  8607. "Illegal word or punctuation after enum."
  8608.     enum Numbers int {...        /* int */
  8609.     enum /Numbers {...            /* the '/' */
  8610.     enum Numbers {one two three}; /* missing commas */
  8611.     enum Numbers {one, two; three}; /* that first semicolon */
  8612. ____
  8613. Includes all the sorts of errors for a “struct” or “union”, and also
  8614. any error inside the body of the enum where the enum constants are
  8615. listed. EnterAct does not record any terms inside a struct or union,
  8616. but does record all enum constants, hence checking for an enum is more
  8617. strict. Some errors (such as an extra comma) can be shrugged off, but
  8618. most others will trigger this message.
  8619.  
  8620. ____
  8621. "#if has no matching #endif, #else, or #elif."
  8622. ____
  8623. I’m afraid you’re on your own tracking this error down, since it could
  8624. be anywhere in the file after the position shown. It could be due to
  8625. a misspelling, such as #eles, or the necessary “if–ender” could be
  8626. missing altogether.
  8627.  
  8628. ____
  8629. "Function(?) has no name."
  8630.     long    (int x, char *tPtr);
  8631. ____
  8632. So, give the poor function a name.
  8633.  
  8634. ____
  8635. "Pascal must be followed by a function."
  8636. ____
  8637. “Pascal” or “pascal” indicates that a function passes arguments and
  8638. returns a value according to Pascal rather than C conventions. For more
  8639. on this topic, see your THINK C manual.
  8640.  
  8641. ____
  8642. "Couldn't find end of initialization."
  8643.     struct MyStruct {int x; long y} instance = {4, 7L;
  8644. ____
  8645. Typically this is caused by a missing or extra '}', as in the above
  8646. example. It could also be caused by a missing semicolon.
  8647.  
  8648. ____
  8649. "Unbalanced statement. Use the Balance command right after OK'ing this
  8650. alert to diagnose the problem."
  8651. ____
  8652. Since the Balance command checks all delimiters and shows you at least
  8653. one end of an unbalanced construction, finding the typo that caused
  8654. the lack of balance is usually straightforward. Selecting Balance a
  8655. second time can be useful—after the second Balance either you’ll be
  8656. shown a mismatch for the first delimiter or you’ll hear a beep
  8657. indicating that the other end is completely missing.
  8658.  
  8659. ____
  8660. "Unbalanced or nested comment. Use the Balance command right after
  8661. OK'ing this alert to diagnose the problem."
  8662. ____
  8663. EnterAct’s comment checking while dictionary–building (and balancing)
  8664. is even stricter than most compilers. For details, see the “Nested and
  8665. bad comments” section in the “Balance” chapter. As a byproduct of
  8666. dictionary–building, all source files in your project will be
  8667. thoroughly checked for comment errors.
  8668.  
  8669. If the problem is due to consecutive comment starts, and you want to
  8670. keep them because that’s the way you do things, select Options from
  8671. the Edit menu and uncheck the “Detect nested comment starts” check box.
  8672. This will partially disable EnterAct’s ability to trap comment
  8673. problems, both when building your dictionary and when balancing.
  8674.  
  8675. ____
  8676. "Lack of balance in parentheses (). Use the Balance command right after
  8677. OK'ing this alert to diagnose the problem."
  8678. ____
  8679. See above, Unbalanced statement....
  8680.  
  8681. ____
  8682. "Unbalanced single or double quotes. Use the Balance command right after
  8683. OK'ing this alert to diagnose the problem."
  8684. ____
  8685. See above, Unbalanced statement....
  8686.  
  8687. ____
  8688. "Unbalanced square brackets []. Use the Balance command right after
  8689. OK'ing this alert to diagnose the problem."
  8690. ____
  8691. See above, Unbalanced statement....
  8692.  
  8693. ____
  8694. "Left curly brace { is not preceded by struct, union, enum, =, or
  8695. function definition."
  8696.     typedef stork MyStruct {int x; long y};/* stork?struct? */
  8697.     long ShouldBeFunction{int x, long y); /* '{' vs '(' */
  8698. ____
  8699. Either the '{' should be something else, such as a '(', or a keyword
  8700. just before the '{' is missing or badly misspelled. EnterAct can handle
  8701. some typo’s, such as typdef sturct... but at some point (such as
  8702. twerpdeaf stork) has to give up and complain.
  8703.  
  8704. ____
  8705. "Colon must signal class name, method name, or low-memory global."
  8706. ____
  8707. Note this exludes some uses of the colon which are irrelevant for
  8708. dictionary–building, such as bit fields and any usage inside a function
  8709. body.
  8710.  
  8711. ____
  8712. "Something is wrong at or near the position shown. Sorry,
  8713. if you can't fix the problem please email tech support."
  8714. ____
  8715. A Shakespearean sonnet will trigger this message. In general, the error
  8716. lies outside of EnterAct’s area of competence. Check for typo’s at or
  8717. near the position shown in the file. This message corresponds to the
  8718. “Syntax error” message that compilers issue when they give up and don’t
  8719. have a clue what’s going on.
  8720.  
  8721. My favourite way to generate this error is to accidentally add a junk
  8722. file with a name ending in .c or .h to a project. A reminder, Add All
  8723. In Folder inhales every text file in a folder.
  8724.  
  8725. This message can also be triggered by a preprocessor conditional that's
  8726. too tough for EnterAct to handle without your help -- see
  8727. "DON’T GIVE UP" near line 108 in this file, and also "Source code
  8728. restrictions", chapter 7, for the details. The symptom here is often
  8729. that the indicated error position is within a function body, an unusual
  8730. case because EnterAct's parser does almost nothing with function
  8731. bodies except check them for balance -- this means the parser ran
  8732. past the start of the function without seeing it. If you spot the usage
  8733. of a macro just above the function, and the usage does not end with
  8734. a semicolon, try entering the name of the macro in the "Macro's to
  8735. skip..." dialog. This usually fixes the problem.
  8736.  
  8737. ____
  8738. "Function body was expected but not found at the position shown."
  8739. ____
  8740. This typically results from a missing left brace '{' at the start of
  8741. a function. Rarely, it can be caused by an excess semicolon in an
  8742. “old–fashioned” style function definition, between the list of
  8743. arguments in round brackets and the start of the function body, eg:
  8744. ____
  8745.     int myFunc(x,y)
  8746.     int x;
  8747.     long y;; /* extra semicolon */
  8748.     {...}
  8749. ____
  8750. The dictionary–builder counts up your arguments, and won’t allow more
  8751. semicolons than you have arguments.
  8752.  
  8753.  
  8754. §    Lookup problems
  8755. For background, here’s a list of common errors that may throw regular
  8756. lookup off:
  8757.     •1    using a synonym
  8758.     •2    full spelling when a nonstandard abbreviation is wanted
  8759.     •3    use of an abbreviation when fuller spelling is wanted
  8760.     •4    full spelling when a standard abbreviation is wanted
  8761.     •5    case error
  8762.     •6    permutation of the words in a name
  8763.     •7    typo
  8764.     •8    spurious extra character
  8765.     •9    homonym (sounds the same, spelled differently)
  8766.     •10    missing definition, due to an error in the source or source file
  8767.             not included etc
  8768.  
  8769. Regular lookup can compensate for the more popular single instances
  8770. of 1-3 above with the lookup table of alternate spellings that you’ll
  8771. find in EnterAct’s 'TEXT' 1000 resource. Single instances of 4-5 are
  8772. thoroughly checked (see next page for the definition of a standard
  8773. abbreviation). An instance of error 6 is also caught, provided there
  8774. are at most four words making up the name. For all other errors (7-10,
  8775. or combinations of errors) EnterAct exhaustively checks what you’ve
  8776. typed against all dictionary entries, totalling up runs of matching
  8777. characters and showing the best matches. If the definition is just
  8778. plain missing, there’s not much that EnterAct can do to help.
  8779.  
  8780. “Sounds like” lookup is extremely error-tolerant, including being
  8781. case-insensitive, at the expense of ignoring some of the information
  8782. (mainly vowels and case) in what you type. It does do the fast checks
  8783. for errors 1-6 above, in the same way as regular lookup. On average
  8784. it’s less accurate than regular lookup, but useful as a last resort.
  8785.  
  8786. Reverse lookup tolerates only case errors, being case-insensitive;
  8787. otherwise, your spelling must be exact (current machines are too slow
  8788. for error-tolerant reverse lookup, and in any case it would be too
  8789. hyperactivated).
  8790.  
  8791.  
  8792. >    Memory failure (yours, that is)
  8793. The term is in your dictionary but you can’t remember the spelling well
  8794. enough to retrieve it? Here are some guidelines to follow:
  8795. •    Nearly every name in your dictionary will have some distinctive part
  8796.     that uniquely identifies it, both from your point of view and
  8797.     EnterAct’s. Spell the distinctive part right, and you’ve got it.
  8798. •    If a name consists entirely of common words (Handle, Get, etc) you’ll
  8799.     have to spell more of the name correctly to help EnterAct distinguish
  8800.     among the possibilities.
  8801. •    If in doubt, spell it out. If there’s no exact match, EnterAct will
  8802.     try all standard abbreviations of each of the words in the name.
  8803. •    When you abbreviate part of a name in your source code, try to follow
  8804.     one of these standard abbreviation rules: 1) starting from the end of
  8805.     a word, drop vowels, and when all vowels are gone start over at the
  8806.     end and drop consonants; 2) truncate the word without regard for
  8807.     vowels; 3) either of the above rules, but keep the last letter of the
  8808.     word. If you follow any of these rules and leave at least 3 characters
  8809.     in the abbreviation then EnterAct will be able to generate the
  8810.     abbreviation from the full spelling, producing instant lookup (eg
  8811.     commandKey will retrieve cmdKey, by applying rule 1 but keeping the
  8812.     last letter of command).
  8813. •    If lookup for the name is immediate but wrong, add a spurious
  8814.     uncommon character at the beginning of the name and try again (if name
  8815.     doesn’t work try zname or xname to force a full search).
  8816. •    Use the Options dialog to increase the number of entries kept per
  8817.     lookup window to 10 or more, and try again.
  8818. •    A single case error will be shrugged off, but otherwise regular
  8819.     lookup is case–sensitive (eg CmdKey or cmdkey will retrieve cmdKey
  8820.     immediately, but CMdKey or CMDKey won’t). If you think you have several
  8821.     case errors, try “sounds like” (<Option><Enter>) lookup instead of
  8822.     regular lookup.
  8823.  
  8824.  
  8825. >    Lookup fails
  8826. You know the term should be in your dictionary but even typing its
  8827. exact name doesn’t retrieve it? This is rare, and is caused by EnterAct
  8828. misinterpreting an error in your source code. Looking at the statement
  8829. where the term is defined or mentioned in your source code will usually
  8830. reveal a simple error such as a missing semicolon or a misspelled
  8831. keyword. If not, switch to your compiler and compile your code until
  8832. you’ve cleared any bugs in the statement where the term occurs.
  8833.  
  8834.  
  8835. >    Miscellaneous lookup problems
  8836. In the rare case that your dictionary is small and the name you type
  8837. doesn’t match any term in the dictionary to any reasonable extent,
  8838. you’ll just hear a beep and no lookup will appear.
  8839.  
  8840. The hint for #defined macros is the same as the hint for other
  8841. #defines—add a '#' after the name, rather than a '('. In general, if
  8842. the lookup you see is not what you wanted and you supplied a
  8843. one–character hint, try again without the hint.
  8844.  
  8845. Looking up classes and methods is discussed in more detail in the
  8846. “Browsing” chapter.
  8847.  
  8848. If you suspect your spelling may be way off, try increasing the “Number
  8849. of entries per lookup window” in the Options dialog to 10 or more, and
  8850. then try the lookup again.
  8851.  
  8852. If you’re quite sure that a term should be in your dictionary but it
  8853. doesn’t appear when you look it up, take a look at the statement where
  8854. the term is defined or mentioned: you could have accidentally violated
  8855. a required coding convention (unlikely), or you could have a succession
  8856. of first–draft errors that has confused EnterAct. A missing semicolon
  8857. or misspelled keyword can sometimes result in a term being skipped.
  8858.  
  8859. If you employ macro’s to do such things as optionally include or omit
  8860. full prototypes, or typedef’s, then you should register them with
  8861. EnterAct using the Macro's to skip command, as described in the “Source
  8862. code restrictions” chapter.
  8863.  
  8864. If you run into a problem that stumps you, please compile your code
  8865. before calling for help. However, if you end up fixing bugs in your code
  8866. that you feel EnterAct should have been able to tolerate, please call
  8867. and let me know. kearle@interlog.com.
  8868.  
  8869.  
  8870. §    Editing problems
  8871. EnterAct has a single level of undo, and the window that the undo
  8872. applies to must be in front in order for the Undo command to be
  8873. enabled. 
  8874.  
  8875. To undo a Paste Selection Behind, the window pasted into must be in
  8876. front, and the window copied from must be just beneath, the way
  8877. EnterAct leaves them after carrying out the command. If you can
  8878. remember which two windows were involved in the Paste Selection Behind,
  8879. just bring them to the front alternately until the Undo is enabled.
  8880.  
  8881. If Paste doesn’t preserve your indentation, it’s because you’re leaving
  8882. some text at the left of the first line unselected when you select a
  8883. range or insertion point for the Paste. In particular, Paste won’t
  8884. preserve indentation if you select an insertion point for the Paste
  8885. that is to the right of the first visible character on the line
  8886. (“visible character” here meaning something that is not a space or
  8887. tab). While we’re on the subject, you can switch off the preservation
  8888. of indentation for a Paste by typing a single character just before
  8889. you Paste, and then deleting it after.
  8890.  
  8891.  
  8892. §    Balance problems
  8893. If lack of balance is caused by mismatched delimiters, such as '{'
  8894. matched against ']', then by repeatedly selecting Balance you can
  8895. toggle between the two mismatched delimiters.
  8896.  
  8897. If the unbalance is due to a missing delimiter, keep in mind that
  8898. EnterAct handles comments properly, so the error will not be due to
  8899. an extra delimiter inside a comment. For example, a comment such as
  8900. ____
  8901.     /* 1) load
  8902.         2) decrement
  8903.         3) store
  8904.     */ 
  8905. ____
  8906. won’t trigger an error, unless you start with an insertion point or
  8907. selection that is inside the comment.
  8908.  
  8909. If you’re attempting to balance a closing delimiter and Balance has
  8910. to run backwards through an “asm {..}” block while searching for the
  8911. matching opener, you might get a spurious error due to something in
  8912. an assembly–language comment—see the “Balance” chapter in “The asm
  8913. problem” section for details.
  8914.  
  8915. If the problem is due to consecutive comment starts, and you want to
  8916. keep them because that’s the way you do things, select Options from
  8917. the Edit menu and uncheck the “Detect nested comment starts” check box.
  8918. This will partially disable EnterAct’s ability to trap comment
  8919. problems, both when building your dictionary and when balancing.
  8920.  
  8921. When you Balance an entire file, you will hear a beep whether or not
  8922. the file balanced, just to tell you that the balancing is finished.
  8923. If the cursor doesn’t move from the top of the file, that means the
  8924. entire file is balanced. If there is any error in the file, you will
  8925. be shown the first unbalanced delimiter.
  8926.  
  8927. When balancing just part of a file, you will hear a beep only if there
  8928. is an error. Otherwise, the selection range will quietly expand to the
  8929. next largest balanced range. If there is no larger enclosing range
  8930. (this is the case when you start with an entire function body selected,
  8931. for example) you’ll hear a beep but the selection range will not change
  8932.  
  8933. With the exception of strings, only two types of balance errors can
  8934. occur; mismatched ends, and missing ends. If Balance beeps and shows
  8935. you an unbalanced delimiter, try immediately selecting Balance again.
  8936. Then, if the problem is due to mismatched delimiters, you will be shown
  8937. the other end. If the problem is a missing end, nothing new will
  8938. happen—you’ll hear another beep, but the selected delimiter will not
  8939. change.
  8940.  
  8941. Strings in double quotes " " are checked for one additional special
  8942. error, a missing backslash if the string is continued across lines.
  8943. The backslash must be the very last character on the continued line,
  8944. just before the <Return>—note that even a space before the <Return>
  8945. will “hide” the backslash. Personally, I don’t think this is
  8946. reasonable, but that’s the way C is.
  8947.  
  8948. -    -    -    -    -    -    -    -    -    -    -    -
  8949. License agreement, tech support
  8950. -    -    -    -    -    -    -    -    -    -    -    -
  8951. §    Technical support
  8952. You can reach me (Ken Earle) at:
  8953. ____
  8954.  
  8955. kearle@interlog.com                                via InterNet.
  8956.  
  8957. INTERNET:kearle@interlog.com                via CompuServe,
  8958.  
  8959. or via real-mail at:
  8960. Ken Earle
  8961. 697 Spadina Ave
  8962. Toronto, Ont
  8963. Canada M5S 2J1
  8964. ____
  8965.  
  8966. (reply will be by e-mail, so please include an email address).
  8967.  
  8968. §    License
  8969. By using EnterAct, you are agreeing to abide by the
  8970. terms of this license. If you disagree, don't use it. If you agree,
  8971. send money, then come to disagree and want your money
  8972. back—well heck, everybody makes mistakes now and then,
  8973. just let me know what the problem is and you'll get your
  8974. refund. Do so within 60 days though, else I may deem that
  8975. EnterAct in your hands has already paid for itself several
  8976. times over.
  8977.  
  8978. This version of EnterAct carries a charge of zero dollars and
  8979. zero cents Canadian, so sending that in is optional. Site licence
  8980. discounts are available.
  8981.  
  8982. Neither Apple Computer, Inc., nor any other company makes any
  8983. warranties, either express or implied, regarding the enclosed computer
  8984. software, its merchantibility, or its fitness for any particular
  8985. purpose. The exclusion of implied warranties is not permitted by some
  8986. governments. The above exclusion may not apply to you. This warranty
  8987. provides you with specific legal rights. There may be other rights that
  8988. you may have which vary according to location.
  8989.  
  8990. EnterAct and this manual are copyrighted, with all rights reserved.
  8991. You may distribute full copies of EnterAct (omitting no files from
  8992. the compressed archive that comprises EnterAct), provided you
  8993. do not charge for EnterAct itself.
  8994.  
  8995. In no event shall Dynabyte or any other legal entity involved in the
  8996. creation, production, or delivery of this product be liable for any
  8997. direct, indirect, consequential, or incidental damages (including loss
  8998. of data, lost business profits, business interruption, carpal tunnel
  8999. syndrome, and the like) arising out of the use of or inability to use the
  9000. software or accompanying material.
  9001.  
  9002. EnterAct does not support shared file access. If you use EnterAct on
  9003. a network, or as a member of a team working on the same source,
  9004. be aware that EnterAct will allow two or more people to open
  9005. one file with full read/write access. You must use some separate
  9006. form of source code control to avoid losing or accidentally
  9007. generating variant versions of files. I have done this, by the way,
  9008. with SourceServer, and everything worked fine.
  9009.  
  9010. This agreement will be governed by the laws of the Province of Ontario
  9011.  
  9012. "hAWK", "Read Resource", their associated source code and
  9013. manuals, and the Drag_on Modules interface are yours to keep,
  9014. free, no matter what. They are governed by the Free Software
  9015. Foundation's "copyleft", as described in the document "copying
  9016. hAWK", included with your EnterAct package.
  9017.  
  9018. -    -    -    -    -    -    -    -    -    -    -    -
  9019. Appendix 1 Drag_on Modules
  9020. -    -    -    -    -    -    -    -    -    -    -    -
  9021.  
  9022. Drag_on Modules resemble HyperCard XCMD’s and MPW tools in that
  9023. they are separately–compiled chunks of code that are designed to
  9024. be called from within some application. The calling application is
  9025. at liberty to provide any of a dozen or so callback functions, which
  9026. mainly enhance text–oriented communication between the calling
  9027. application and Drag_on Modules, but these are all optional. The
  9028. calling interface has been kept simple, so that if you have an
  9029. application written in C or C++ you can add to it the ability to call
  9030. Drag_on Modules without hurting yourself—a day or two should do
  9031. it. Instructions for doing so can be found towards the end of the
  9032. “hAWK User’s Manual” and in the file “Call_Resource.c”. The
  9033. source code for “Minimal App7" illustrates the basic process. As
  9034. far as the callback functions go, if your application deals with
  9035. TEXT documents you’ll be able to support most of them easily, and
  9036. if you can’t support one then the Drag_on Modules will get along
  9037. without it.
  9038.  
  9039. The idea behind Drag_on Modules is to provide a medium for the
  9040. inexpensive modular distribution of source code that works best
  9041. when it is allowed to interact with full applications. Drag_on
  9042. Modules could easily be repackaged as separate applications, but
  9043. then the interaction with other applications would be slower. In
  9044. the absence of a universal “shell”, the next–best solution offered
  9045. by Drag_on Modules and the like is to let each application be a
  9046. shell. Admittedly, System 7 has promise as a universal application
  9047. coordinator, but while we’re waiting it’s nice to be able to achieve
  9048. the same effect with just 2K of overhead per application and the
  9049. extreme simplicity of file–based communication for major input
  9050. and output.
  9051.  
  9052. To help the illusion that there is a shell lurking in the background,
  9053. Drag_on Modules communicate by means of standard input, output, and
  9054. error files. This allows results from one Drag_on Module run to be
  9055. passed as input to a subsequent run, for example.
  9056.  
  9057. Three Drag_on Modules are currently being shipped; hAWK, Indent,
  9058. and Read Resource.
  9059.  
  9060. Read Resource is just a simple resource or data fork viewer.
  9061.  
  9062. Indent adjusts whitespace in C, or C++ code according to
  9063. a particular style. It can be invoked through a simple dialog or
  9064. by a command line, and the only hard part is creating a
  9065. description of your preferred style, for which you should see
  9066. the Indent User's Manual.
  9067.  
  9068. hAWK is a Mac implementation of AWK. You may have seen above
  9069. that hAWK has a "three clicks and Run" interface, and it's true:
  9070. for example, you could select hundreds of file as input to a
  9071. hAWK program by putting bullets beside them in your project
  9072. window, and then to call up the program: select "hAWK" from
  9073. the EnterAct menu; pick your program from the top popup;
  9074. optionally adjust the input option (all or part of the front file,
  9075. MFS-selected (ie bulleted) files, or a specific file -- this option
  9076. can be saved with the program, so normally there is no need to
  9077. change it); and then click Run. The program will run in the
  9078. background as you continue to work with EnterAct.
  9079.  
  9080. Added for version 3, you can now write hAWK programs that
  9081. watch EnterAct's clipboard, and, when your specified conditions
  9082. are met, write anything you like back to the clipboard. This
  9083. gives you in effect a "magic clipboard", ideal for reducing
  9084. repetitive, moderately complicated tasks to a simple Copy
  9085. and Paste. For details see the separate document
  9086. "EnterAct's magic clipboard".
  9087.  
  9088. And in version 3.6, a hAWK program can be invoked by placing
  9089. a command line for the program in any EnterAct text window and
  9090. then  pressing <enter> or <command><return> with the command line
  9091. selected. For an example, see "§    Code templates" in the Editing chapter
  9092. above. For details, see "Appendix 2 Calling hAWK programs" just below.
  9093.  
  9094. Drag_on Modules come with complete source code. Complete code and
  9095. instructions for calling Drag_on Modules from your own application can
  9096. be found in the file “Call_Resource.c”, as supplemented by the example
  9097. of “Minimal App7".  If you are interested in creating your own Drag_on
  9098. Module, please see the “write your own Drag_on” folder.
  9099.  
  9100. -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -
  9101. Appendix 2 Calling hAWK programs
  9102. -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -
  9103. hAWK programs can be called via a dialog, by picking "hAWK" from
  9104. the EnterAct menu, or by entering a command line in any text
  9105. window. The "hAWK User's Manual" explains how to write hAWK
  9106. programs, and also how to run programs via the dialog. If you like
  9107. the idea of being a power EnterAct user, the section below called
  9108. "Calling hAWK with a command line" will have you firing off
  9109. hAWK programs by typing a few characters.
  9110.  
  9111. §    Calling hAWK from the menu
  9112. EnterAct follows the procedure described in the hAWK User's Manual,
  9113. in the chapter "Running hAWK programs". The "MFS selected files"
  9114. input option corresponds to the bulleted text files in your current
  9115. EnterAct project (you can put bullets (•) beside project file names by
  9116. using the buttons in the Find dialog, or by <option>dragging in the
  9117. project window). Your hAWK program will run in the background
  9118. by default, so you can continue working in EnterAct while running
  9119. a lengthy program.
  9120.  
  9121. If you're using EnterAct to view this and have installed the
  9122. Drag_on Modules folder, give hAWK a try right now:
  9123.     •    put some bullets beside some file names in your project window
  9124.     (if you don't have a project yet, please read at least "EnterAct in
  9125.     brief" to get going)
  9126.     •    select "hAWK" from the EnterAct menu
  9127.     •    pick the program "$EchoFullPathNames" from the top popup
  9128.     menu in the resulting setup dialog
  9129.     •    click the Run button
  9130.     •    the stdout window will appear after a couple of seconds,
  9131.     holding a list of the full path names for your selected project
  9132.     files.
  9133.  
  9134. If you're intrigued, please see the hAWK User's Manual for details.
  9135.  
  9136. §    Calling hAWK with a command line
  9137. If you need to regularly run a hAWK program, and it doesn't take
  9138. its input from the front text window, you might find it handier
  9139. to run it with a command line. Command lines aren't too nasty
  9140. to construct, and you'll only have to do it once for each program
  9141. if you create a code template for the command line. There
  9142. are examples below, and it really is fairly easy.
  9143.  
  9144. You can enter a hAWK command line in any text window. To run it,
  9145. select the entire command line and press <command><return>
  9146. or <enter>. This will run the hAWK program immediately, without
  9147. any setup dialog to go through. Hey, that's the whole point.....
  9148.  
  9149. First let's build hAWK command lines. This is the format of a hAWK
  9150. command line (note it can cover several lines):
  9151. ____
  9152. hAWK -f"Program Name" -f"Library Name"
  9153.     -s -ss -n
  9154.     -vVariableName="some value" -- MFS "InputFullPathname"
  9155. ____
  9156.  
  9157. and this is what that means:
  9158.     •    the command line text must begin with "hAWK" followed by a space
  9159.     or tab
  9160.     •    there must be one program name, as signalled by -f. If you just supply
  9161.     a simple program name, it must reside in the "hAWK programs" folder.
  9162.     Use a full path name if the program is in some other folder. If the
  9163.     program name (or any part of the full path name) contains a space, then
  9164.     put quotes "" around the full name, otherwise the quotes are not needed.
  9165.     •    the library names are the same as program name, and these are
  9166.     optional. Since library names look the same as the program name, the
  9167.     first one seen is taken as the program name. Libraries are scarce as
  9168.     hen's teeth, so forget about them.
  9169.     •    variables are signalled by the -v option, eg -vmyName="Ken E" or
  9170.     -vLevel=1 where the quotes "" are optional if the value contains no
  9171.     spaces or tabs. Spaces before the '=' sign are optional, but don't put any
  9172.     between the '=' and the actual value. Variables are optional. In
  9173.     particular, any variable settings that have been saved with the program
  9174.     (by using the setup dialog) will automatically be passed along with the
  9175.     command line, and so you should set these variables on the command
  9176.     line only if you want to override the default saved values (to see those,
  9177.     select the program in the setup dialog and click the "Set variables..."
  9178.     button).
  9179.     •    "--" signals that input files only follow. This is optional, mainly to
  9180.     make reading easier.
  9181.     •    "MFS" stands for "all files currently selected for multi-file
  9182.     operations", in other words the bulleted files in your project
  9183.     window as you're no doubt tired of hearing. This one is optional.
  9184.     •    input file names are optional, and should be provided as full path
  9185.     names. If any part of the full name contains a space then the quotes ""
  9186.     are necessary, otherwise they're optional.
  9187.  
  9188.     You may also optionally use the following output options (ugh was
  9189.     that English?) in the command line (place them before any "--"):
  9190.     •    -s means show stdout when done
  9191.     •    -ss means show and select stdout when done
  9192.     •    -n means no showing of stdout when done.
  9193.  
  9194. If you don't provide an output option, any output option from the
  9195. settings saved with the program will be used instead (these correspond
  9196. to the "Show/select stdout" checkboxes in the setup dialog). Any output
  9197. option you do provide overrides the saved settings.
  9198.  
  9199. You may supply both "MFS" and one or more specific input files on a
  9200. command line, and unlike the dialog approach you may supply any
  9201. number of variables (the dialog is limited to 10).
  9202.  
  9203. Here are some example command lines:
  9204. ____
  9205. hAWK -f$EchoFullPathNames -- MFS
  9206.  
  9207. hAWK -f$BoilerPlate -vputInComment=1 -vfile="@.c"
  9208.     -vauthor="KE" -vcompany="bdibdi" -ss
  9209.  
  9210. hAWK -f$FormatFunctionIntro
  9211.  
  9212. hAWK -f"Disk:Folder:$SomeProgram" -- "Disk:Folder2:OneInputFile"
  9213.     "Disk:Folder3:AnotherInputFile"
  9214. ____
  9215. The first three there are real hAWK programs supplied with EnterAct,
  9216. and if you take a look at the programs themselves it will help you
  9217. see what happens with each command line. The last one is made up.
  9218. "bdibdi" is pronounced "two little bdi's".
  9219.  
  9220. Now the point of this, as mentioned, is to bypass the setup dialog
  9221. and call a hAWK program with just a few keystrokes. Since command
  9222. lines are more than a few keys long, there are two approaches you can
  9223. take to avoid retyping them:
  9224.     •    save them all in a file, and then select them when needed
  9225.     •    create a code template with a nice mnemonic name for each
  9226.     command line. This is the handiest approach, provided you don't
  9227.     have several dozen programs you want to run regularly.
  9228.  
  9229. Code templates are explained in the "Code templates" section of the
  9230. "Editing" chapter, in fact they're nicely explained at the top of the
  9231. "EnterAct Code Templates" file which is where they all live. This is
  9232. essentially a glossary capability, and to use an entry you type its
  9233. name and press <command><return> to expand it. Code templates know
  9234. about hAWK templates, and if an entry expands to a hAWK template
  9235. then it will be selected for you. To run the template, you press
  9236. <command><return> a second time.
  9237.  
  9238. Here's a typical code template for a hAWK command line, taken from
  9239. the EnterAct Code Templates file:
  9240. ____
  9241. ENTRY
  9242. echo
  9243. hAWK -f$EchoFullPathNames -- MFS
  9244.  
  9245. END
  9246. ____
  9247. This means you can get a list of full path names for bulleted files in
  9248. your project by typing "echo" and then pressing <command><return>
  9249. twice. The first <command><return> replaces "echo" with the
  9250. command line, and selects it: the second <command><return> runs
  9251. the hAWK program "$EchoFullPathNames".
  9252.  
  9253. To try one out for yourself, open up the EnterAct Code Templates file,
  9254. scroll down just a little bit to the "boiler" entry, and change the
  9255. values of the "author" and "company" variables to suit your taste.
  9256. (Note in this template the value of author is set to "@@me", a builtin
  9257. template variable that will expand to your name if you have used
  9258. Internet Config to set it.)
  9259. Save the Templates file, and then (immediately) in any text window
  9260. type "boiler" and press <command><return> twice. See what you get.
  9261.  
  9262. Not that tough after all.
  9263.  
  9264. -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -
  9265. Appendix 3 Indent for restyling code
  9266. -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -
  9267.  
  9268. "Indent" is a Drag_on Module which changes the appearance of a C or
  9269. C++ program by altering whitespace in accordance with a
  9270. particular "style" or collection of options. You can for example
  9271. convert from putting the opening '{' on the same line as an "if"
  9272. to putting it on the following line.
  9273.  
  9274. You'll need to consult the "Indent User’s Manual" to understand all
  9275. the options and create your own preferred list. The "Indent options"
  9276. chapter there contains a description of the many options, and the
  9277. "Creating Indent profiles" contains an example of making a TEXT file
  9278. that lists your preferred options.
  9279.  
  9280. Once you have your prefered style, Indent is trivial to use: in brief,
  9281. you preselect some input in EnterAct if you want the input for Indent
  9282. to come from your front file or a list of bulleted files, call up the
  9283. Indent dialog from under the "EnterAct" menu, select your choice of
  9284. style, input, and output from the popup menus, and click "Run". The
  9285. "Indent User’s Manual" contains complete instructions for running
  9286. Indent, so only details which have to do with EnterAct itself are
  9287. emphasized here.
  9288.  
  9289. The "MFS selected files" input option corresponds to the bulleted
  9290. text files in your current EnterAct project (you can put bullets (•)
  9291. beside project file names by using the buttons in the Find dialog,
  9292. or by <option>dragging in the project window).
  9293.  
  9294. If you select "To $tempStdOut" as your output option with Indent,
  9295. then EnterAct will show you "$tempStdOut" after Indent is done.
  9296.  
  9297. For casual use, there is only one useful command line to invoke
  9298. Indent, and that's
  9299.     Indent myProfile.pro -MFS
  9300. where "myProfile.pro" is the name of a profile in the "Indent profiles"
  9301. folder (you will probably want to create your own profile) and
  9302. "-MFS" means take as input all the bulleted files in the project window.
  9303. For ultra quick Indent calling, paste the following code template 
  9304. into your "EnterAct code templates" file, after correcting the profile
  9305. name to the one you want:
  9306. ____
  9307. ENTRY
  9308. indent
  9309. Indent myProfile.pro -MFS
  9310.  
  9311. END
  9312. ____
  9313. To use this template, you would bullet up some files in your project
  9314. window, type "indent" in any text window, and then press
  9315. <command><return> twice and wait a few seconds while Indent works.
  9316.  
  9317. Code templates are explained in the "Code templates" section of the
  9318. "Editing" chapter, in fact they're nicely explained at the top of the
  9319. "EnterAct Code Templates" file which is where they all live. This is
  9320. essentially a glossary capability, and to use an entry you type its
  9321. name and press <command><return> to expand it. Code templates know
  9322. about Indent templates, and if an entry expands to an Indent template
  9323. then it will be selected for you. To run the template, you press
  9324. <command><return> a second time.
  9325.  
  9326. As a special reward for reading all this, it's worth mentioning that
  9327. all other versions of Indent in the world require a special list of
  9328. ALL typedef names to be passed on the command line if you want
  9329. the best formatting. But with EnterAct, if you have a project open
  9330. when you call Indent that contains all the relevant source and
  9331. header files for all typedefs in the source you want to be restyled
  9332. then EnterAct will supply the list of typedefs to Indent on your
  9333. behalf. Have your dictionary built of course, but that's all there is
  9334. to it.
  9335.  
  9336. And to finish up, Indent is a completely separate product from
  9337. EnterAct, and comes with complete source code.
  9338.  
  9339. -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -
  9340. Appendix 4 EnterAct as THINK's editor
  9341. -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -
  9342.  
  9343. EnterAct can be used as a replacement for THINK’s own internal editor.
  9344. This means you can take full advantage of EnterAct’s features when
  9345. creating your documentation and source, and the THINK Project Manager
  9346. will be able to track all the changes you make as though you were using
  9347. its own editor.
  9348.  
  9349.  
  9350. §    Requirements
  9351. To use EnterAct as a replacement for THINK’s own internal editor, you
  9352. must have:
  9353. •    EnterAct 2.5 or later (you do)
  9354. •    THINK C 6 or later
  9355. •    System 7
  9356. •    about 2 Megabytes each for the THINK Project Manager and EnterAct.
  9357.  
  9358. §    Installing EnterAct as THINK’s editor
  9359. Create an alias of EnterAct, rename it “Editor”, and drop it into
  9360. the “Tools” or “(Tools)” folder inside your THINK C folder. Then
  9361. start up THINK Project Manager, and under the Project Managers’s
  9362. Editor options select “use external editor”—you’ll find this under
  9363. the Edit menu, in the “Editor” options for the Project Manager.
  9364. Recommended, deselect the “Reopen files” option in THINK’s Editor
  9365. options at this point, since EnterAct does a more thorough job of
  9366. reopening EnterAct project files, and this should prove to be all
  9367. you need.
  9368.  
  9369.  
  9370. §    Starting a session
  9371. Start the THINK Project Manager and open a THINK project in your usual
  9372. way. The first action you undertake that requires viewing a text file
  9373. will trigger THINK to start EnterAct. Most often you’ll double-click
  9374. on a file listed in your THINK project, but you might also select the
  9375. “Open” command, or double-click on the result of a batch find to view
  9376. a particular instance, etc. In all cases, when EnterAct starts up you
  9377. will be offered the opportunity to open an existing EnterAct project
  9378. or create a new one. After you’ve opened or created a project, or
  9379. cancelled, the text file will open in EnterAct.
  9380.  
  9381.  
  9382. §    Working with EnterAct as THINK’s editor
  9383. EnterAct and THINK projects serve different purposes, and typically
  9384. even hold different lists of files—an EnterAct project, for example,
  9385. can contain source files that are included for reference only, and
  9386. system and other header files can be explicitly listed in the project
  9387. window, and your dictionary updated for them, right from the moment
  9388. you create the project. So you’ll need an EnterAct project to handle
  9389. your code creation, documentation, and review, and a THINK project to
  9390. handle compiling and testing.
  9391.  
  9392.  
  9393. For the most part, when you want to compile or test you should be in
  9394. THINK, and when you want to edit or view files you should be in
  9395. EnterAct. To switch from EnterAct to THINK, click in your THINK project
  9396. window. To return to EnterAct, click in your EnterAct project window,
  9397. or any open text window that belongs to EnterAct. Though EnterAct may
  9398. be more tightly coupled to THINK in future versions, this simple
  9399. approach has the advantage that all of the THINK commands you use
  9400. regularly are still where you expect under your THINK menus, with one
  9401. extra click on your THINK project window required to place you back
  9402. in the right context for them.
  9403.  
  9404. Of course, opening any text file when in THINK will automatically
  9405. switch you over to EnterAct in order to display the file. And if a file
  9406. is listed in both your THINK and EnterAct projects, you can
  9407. double-click on either instance to open the file, with the same results
  9408.  
  9409. If all of your changes to source files have been made with EnterAct
  9410. acting as THINK’s replacement editor, or with THINK’s own editor, then
  9411. you can bring your THINK project fully up to date with the “Bring Up
  9412. To Date” command under THINK’s “Project” menu, and there is no need
  9413. to “Make” or “Scan Disk” to detect which files have changed. Your
  9414. EnterAct projects will typically need to be brought up to date only
  9415. for significant changes made outside of function bodies, and if all
  9416. changes were made with EnterAct you can use the Update Dictionary
  9417. command under EnterAct’s “EnterAct” menu.
  9418. Please note that both EnterAct and the THINK Project Manager will
  9419. automatically note changed files only for the project that is currently
  9420. open, and if some other project includes a changed file then you will
  9421. need to use THINK’s “Make” command or EnterAct’s Update Dictionary
  9422. to bring the project fully up to date.
  9423.  
  9424. In brief: there is nothing special you need to do when using EnterAct
  9425. as THINK’s editor.
  9426.  
  9427.  
  9428. §    Using THINK’s Find commands from EnterAct
  9429. Three commands at the bottom of EnterAct’s Search menu allow you to
  9430. invoke THINK’s Find commands: specifically, you can view the next or
  9431. previous matches from a batch find, or call THINK’s “Find In Next File”
  9432. command from EnterAct.
  9433.  
  9434. THINK Find Again and THINK Find Previous refer to the results of a
  9435. batch find done in THINK, and allow you to step through the matches,
  9436. viewing them with EnterAct. The batch find must first be carried out
  9437. in THINK, for which see your THINK User Manual.
  9438.  
  9439. THINK Find In Next File is the equivalent of returning to the THINK
  9440. Project Manager and selecting “Find In Next File”—once again, you will
  9441. need to use THINK’s Find dialog to set up the multi-file search
  9442. beforehand.
  9443.  
  9444. By the way, EnterAct’s own multi-file searching capabilities are
  9445. entirely independent of the THINK Project Manager’s. To do a straight
  9446. multi-file search, you should use EnterAct, since here it is slightly
  9447. easier to set up. For a batch find, you’ll need to set your search up
  9448. in the THINK Project Manager and then use THINK Find Again and THINK
  9449. Find Previous in EnterAct afterwards. (EnterAct also has a batch find,
  9450. but doesn't (yet) have the nifty Find Previous gizmoid. To jump to
  9451. a particular instance of one of EnterAct's finds, click on the line
  9452. reporting the find and use "Go to...".)
  9453.  
  9454. Find in THINK Reference does the same thing as the command of the
  9455. same name in the THINK Project Manager's editor: it passes your
  9456. currently-selected text over to THINK Reference, where you'll be
  9457. shown any entry it has on the name in question. Note this works only
  9458. with THINK Reference version 2 or later. For this command to work,
  9459. you need to have a folder named "Tools" or "(Tools)" next to EnterAct,
  9460. and drop an alias of THINK Reference in it.
  9461.  
  9462. -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -
  9463. Appendix 5 EnterAct and Code Warrior
  9464. -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -
  9465. By default, when you open a document and Code Warrior also has the
  9466. document open, EnterAct will put up a dialog giving you the options
  9467. of forcing Code Warrior to save and close the file before EnterAct
  9468. opens it, or of cancelling the Open. If you're not sure, return to
  9469. Code Warrior and decide whether or not to save the file. Note if
  9470. you do click "OK" to have EnterAct tell Code Warrior to save and
  9471. close the file, any changes to the file will not be undoable --after
  9472. all, it's not like editors these days have 10,000-level persistent
  9473. selective undo or anything. But shouldn't they?
  9474.  
  9475. As described elsewhere, EnterAct will by default save all
  9476. documents when you switch out, and refresh them from disk
  9477. when you switch back (only if needed of course). So there is
  9478. no decision to make when editing documents with Code Warrior
  9479. while EnterAct has the same documents open, since EnterAct will
  9480. have already saved them. When you switch back to EnterAct,
  9481. if you left the document open with Code Warrior you'll get that
  9482. dialog asking about forcing Code Warrior to save and close it,
  9483. or if you saved and closed the document before leaving Code Warrior
  9484. then EnterAct will just refresh the document from disk.
  9485.  
  9486. The "default" referred to above is the “Safe switching...” option
  9487. in EnterAct's Options dialog, which is on by default and saves your
  9488. documents when you switch out from EnterAct. Better to save too
  9489. often, since you can always revert with the “Show Activities”
  9490. command and a little cut and paste.
  9491.  
  9492. To use EnterAct as just a looker-upper with Code Warrior, see
  9493. "§    EnterAct as a "definition finder" for other editors" in the Lookup
  9494. chapter.
  9495.  
  9496. You can use EnterAct's multi-file search independently of Code
  9497. Warrior's, and EnterAct's is often handier because you can include
  9498. more files in your EnterAct project (all toolbox headers, or files
  9499. from several separate Code Warrior projects, or all Power Plant
  9500. files, for example).
  9501.  
  9502. -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -
  9503. Appendix 6 the Scripts menu
  9504. -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -
  9505. EnterAct itself understands only the four basic Apple events,
  9506. but you can use it to run any compiled AppleScript: just drop
  9507. the script in your "(EnterAct Scripts)" folder and it will
  9508. appear under EnterAct's Scripts menu (the next time you
  9509. start EnterAct). The scripts must be compiled, and should be
  9510. the sort that don't need any parameters or events to get going,
  9511. and that quit when they're done their specific task. Recompiling
  9512. your current CW or Symantec project is an example.
  9513.  
  9514. Any text your script puts in the AppleScript "result" variable
  9515. will be shown to you when the script terminates, in EnterAct's
  9516. stdout window.
  9517.  
  9518. To see it work, try the "Beep Once" script that's supplied. You should
  9519. see the stdout window after you hear a beep.
  9520.  
  9521. Event handling is minimal in EnterAct while a script is running: you
  9522. can interrupt a script with <Command><period>, and switch out of
  9523. EnterAct, but nothing else. The upshot is that scripts are appropriate
  9524. for running within EnterAct if they do something not too lengthy that
  9525. has to be done anyway before you can continue. Scripts that are to
  9526. run all the time or that take a very long time should be run some
  9527. other way (eg by double-clicking on the script itself).
  9528.  
  9529.